diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 01:35:06 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 02:11:48 +0200 |
commit | 1a64deeb894dc95e2645a75771732c6cc53a79ad (patch) | |
tree | 1b9df4838f894577a09b9b260151756272efeb53 /modules/private/websites/patrick_fodella | |
parent | fa25ffd4583cc362075cd5e1b4130f33306103f0 (diff) | |
download | Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip |
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them
contained personnal information about users. All thos changes got
stashed into a single commit (history is kept in a different place) and
private information was moved in a separate private repository
Diffstat (limited to 'modules/private/websites/patrick_fodella')
-rw-r--r-- | modules/private/websites/patrick_fodella/altermondia.nix | 73 | ||||
-rw-r--r-- | modules/private/websites/patrick_fodella/ecolyeu.nix | 72 |
2 files changed, 0 insertions, 145 deletions
diff --git a/modules/private/websites/patrick_fodella/altermondia.nix b/modules/private/websites/patrick_fodella/altermondia.nix deleted file mode 100644 index 2a41aa3..0000000 --- a/modules/private/websites/patrick_fodella/altermondia.nix +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | { lib, pkgs, config, ... }: | ||
2 | let | ||
3 | cfg = config.myServices.websites.patrick_fodella.altermondia; | ||
4 | varDir = "/var/lib/ftp/patrick_fodella/altermondia"; | ||
5 | apacheUser = config.services.httpd.Prod.user; | ||
6 | apacheGroup = config.services.httpd.Prod.group; | ||
7 | in { | ||
8 | options.myServices.websites.patrick_fodella.altermondia.enable = lib.mkEnableOption "enable Patrick Fodella Altermondia's website"; | ||
9 | |||
10 | config = lib.mkIf cfg.enable { | ||
11 | services.webstats.sites = [ { name = "altermondia.org"; } ]; | ||
12 | |||
13 | system.activationScripts.patrick_fodella_altermondia = { | ||
14 | deps = [ "httpd" ]; | ||
15 | text = '' | ||
16 | install -m 0755 -o ${apacheUser} -g ${apacheGroup} -d /var/lib/php/sessions/patrick_fodella_altermondia | ||
17 | ''; | ||
18 | }; | ||
19 | systemd.services.phpfpm-patrick_fodella_altermondia.after = lib.mkAfter [ "mysql.service" ]; | ||
20 | systemd.services.phpfpm-patrick_fodella_altermondia.wants = [ "mysql.service" ]; | ||
21 | services.phpfpm.pools.patrick_fodella_altermondia = { | ||
22 | user = apacheUser; | ||
23 | group = apacheGroup; | ||
24 | settings = { | ||
25 | "listen.owner" = apacheUser; | ||
26 | "listen.group" = apacheGroup; | ||
27 | |||
28 | "pm" = "ondemand"; | ||
29 | "pm.max_children" = "5"; | ||
30 | "pm.process_idle_timeout" = "60"; | ||
31 | |||
32 | "php_admin_value[open_basedir]" = "/var/lib/php/sessions/patrick_fodella_altermondia:${varDir}:/tmp"; | ||
33 | "php_admin_value[session.save_path]" = "/var/lib/php/sessions/patrick_fodella_altermondia"; | ||
34 | }; | ||
35 | phpOptions = config.services.phpfpm.phpOptions + '' | ||
36 | disable_functions = "mail" | ||
37 | ''; | ||
38 | phpPackage = pkgs.php72; | ||
39 | }; | ||
40 | services.websites.env.production.modules = [ "proxy_fcgi" ]; | ||
41 | services.websites.env.production.vhostConfs.patrick_fodella_altermondia = { | ||
42 | certName = "patrick_fodella"; | ||
43 | addToCerts = true; | ||
44 | hosts = ["altermondia.org" "www.altermondia.org" ]; | ||
45 | root = varDir; | ||
46 | extraConfig = [ | ||
47 | '' | ||
48 | Use Stats altermondia.org | ||
49 | |||
50 | RewriteEngine on | ||
51 | RewriteCond "%{HTTP_HOST}" "!^altermondia\.org$" [NC] | ||
52 | RewriteRule ^(.+)$ https://altermondia.org$1 [R=302,L] | ||
53 | |||
54 | <FilesMatch "\.php$"> | ||
55 | SetHandler "proxy:unix:${config.services.phpfpm.pools.patrick_fodella_altermondia.socket}|fcgi://localhost" | ||
56 | </FilesMatch> | ||
57 | |||
58 | <Location /xmlrpc.php> | ||
59 | AllowOverride None | ||
60 | Require all denied | ||
61 | </Location> | ||
62 | <Directory ${varDir}> | ||
63 | DirectoryIndex index.php index.htm index.html | ||
64 | Options Indexes FollowSymLinks MultiViews Includes | ||
65 | AllowOverride all | ||
66 | Require all granted | ||
67 | </Directory> | ||
68 | '' | ||
69 | ]; | ||
70 | }; | ||
71 | }; | ||
72 | } | ||
73 | |||
diff --git a/modules/private/websites/patrick_fodella/ecolyeu.nix b/modules/private/websites/patrick_fodella/ecolyeu.nix deleted file mode 100644 index 00dab76..0000000 --- a/modules/private/websites/patrick_fodella/ecolyeu.nix +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | { lib, pkgs, config, ... }: | ||
2 | let | ||
3 | cfg = config.myServices.websites.patrick_fodella.ecolyeu; | ||
4 | varDir = "/var/lib/ftp/patrick_fodella/ecolyeu_pessicart"; | ||
5 | apacheUser = config.services.httpd.Prod.user; | ||
6 | apacheGroup = config.services.httpd.Prod.group; | ||
7 | in { | ||
8 | options.myServices.websites.patrick_fodella.ecolyeu.enable = lib.mkEnableOption "enable Patrick Fodella Ecolyeu's website"; | ||
9 | |||
10 | config = lib.mkIf cfg.enable { | ||
11 | services.webstats.sites = [ { name = "ecolyeu-pessicart-nice.fr"; } ]; | ||
12 | |||
13 | system.activationScripts.patrick_fodella_ecolyeu = { | ||
14 | deps = [ "httpd" ]; | ||
15 | text = '' | ||
16 | install -m 0755 -o ${apacheUser} -g ${apacheGroup} -d /var/lib/php/sessions/patrick_fodella_ecolyeu | ||
17 | ''; | ||
18 | }; | ||
19 | systemd.services.phpfpm-patrick_fodella_ecolyeu.after = lib.mkAfter [ "mysql.service" ]; | ||
20 | systemd.services.phpfpm-patrick_fodella_ecolyeu.wants = [ "mysql.service" ]; | ||
21 | services.phpfpm.pools.patrick_fodella_ecolyeu = { | ||
22 | user = apacheUser; | ||
23 | group = apacheGroup; | ||
24 | settings = { | ||
25 | "listen.owner" = apacheUser; | ||
26 | "listen.group" = apacheGroup; | ||
27 | |||
28 | "pm" = "ondemand"; | ||
29 | "pm.max_children" = "5"; | ||
30 | "pm.process_idle_timeout" = "60"; | ||
31 | |||
32 | "php_admin_value[open_basedir]" = "/var/lib/php/sessions/patrick_fodella_ecolyeu:${varDir}:/tmp"; | ||
33 | "php_admin_value[session.save_path]" = "/var/lib/php/sessions/patrick_fodella_ecolyeu"; | ||
34 | }; | ||
35 | phpOptions = config.services.phpfpm.phpOptions + '' | ||
36 | disable_functions = "mail" | ||
37 | ''; | ||
38 | phpPackage = pkgs.php72; | ||
39 | }; | ||
40 | services.websites.env.production.modules = [ "proxy_fcgi" ]; | ||
41 | services.websites.env.production.vhostConfs.patrick_fodella_ecolyeu = { | ||
42 | certName = "patrick_fodella"; | ||
43 | certMainHost = "ecolyeu-pessicart-nice.fr"; | ||
44 | hosts = ["ecolyeu-pessicart-nice.fr" "www.ecolyeu-pessicart-nice.fr" ]; | ||
45 | root = varDir; | ||
46 | extraConfig = [ | ||
47 | '' | ||
48 | Use Stats ecolyeu-pessicart-nice.fr | ||
49 | |||
50 | RewriteEngine on | ||
51 | RewriteCond "%{HTTP_HOST}" "!^www\.ecolyeu-pessicart-nice\.fr$" [NC] | ||
52 | RewriteRule ^(.+)$ https://www.ecolyeu-pessicart-nice.fr$1 [R=302,L] | ||
53 | |||
54 | <FilesMatch "\.php$"> | ||
55 | SetHandler "proxy:unix:${config.services.phpfpm.pools.patrick_fodella_ecolyeu.socket}|fcgi://localhost" | ||
56 | </FilesMatch> | ||
57 | |||
58 | <Location /xmlrpc.php> | ||
59 | AllowOverride None | ||
60 | Require all denied | ||
61 | </Location> | ||
62 | <Directory ${varDir}> | ||
63 | DirectoryIndex index.php index.htm index.html | ||
64 | Options Indexes FollowSymLinks MultiViews Includes | ||
65 | AllowOverride all | ||
66 | Require all granted | ||
67 | </Directory> | ||
68 | '' | ||
69 | ]; | ||
70 | }; | ||
71 | }; | ||
72 | } | ||