diff options
Diffstat (limited to 'modules/private/websites/florian')
-rw-r--r-- | modules/private/websites/florian/app.nix | 24 | ||||
-rw-r--r-- | modules/private/websites/florian/integration.nix | 6 | ||||
-rw-r--r-- | modules/private/websites/florian/production.nix | 6 |
3 files changed, 19 insertions, 17 deletions
diff --git a/modules/private/websites/florian/app.nix b/modules/private/websites/florian/app.nix index e262c59..c65c26f 100644 --- a/modules/private/websites/florian/app.nix +++ b/modules/private/websites/florian/app.nix | |||
@@ -1,6 +1,6 @@ | |||
1 | { lib, pkgs, config, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | 2 | let |
3 | adminer = pkgs.callPackage ../commons/adminer.nix {}; | 3 | adminer = pkgs.callPackage ../commons/adminer.nix { inherit config; }; |
4 | secrets = config.myEnv.websites.tellesflorian.integration; | 4 | secrets = config.myEnv.websites.tellesflorian.integration; |
5 | app = pkgs.webapps.tellesflorian.override { environment = secrets.environment; }; | 5 | app = pkgs.webapps.tellesflorian.override { environment = secrets.environment; }; |
6 | cfg = config.myServices.websites.florian.app; | 6 | cfg = config.myServices.websites.florian.app; |
@@ -24,15 +24,17 @@ in { | |||
24 | "./bin/console --env=${app.environment} cache:clear --no-warmup" | 24 | "./bin/console --env=${app.environment} cache:clear --no-warmup" |
25 | ]; | 25 | ]; |
26 | phpOpenbasedir = [ "/tmp" ]; | 26 | phpOpenbasedir = [ "/tmp" ]; |
27 | phpPool = '' | 27 | phpPool = { |
28 | php_admin_value[upload_max_filesize] = 20M | 28 | "php_admin_value[upload_max_filesize]" = "20M"; |
29 | php_admin_value[post_max_size] = 20M | 29 | "php_admin_value[post_max_size]" = "20M"; |
30 | ;php_admin_flag[log_errors] = on | 30 | #"php_admin_flag[log_errors]" = "on"; |
31 | pm = ondemand | 31 | "pm" = "ondemand"; |
32 | pm.max_children = 5 | 32 | "pm.max_children" = "5"; |
33 | pm.process_idle_timeout = 60 | 33 | "pm.process_idle_timeout" = "60"; |
34 | env[SYMFONY_DEBUG_MODE] = "yes" | 34 | }; |
35 | ''; | 35 | phpEnv = { |
36 | SYMFONY_DEBUG_MODE = "yes"; | ||
37 | }; | ||
36 | phpWatchFiles = [ | 38 | phpWatchFiles = [ |
37 | config.secrets.fullPaths."webapps/${app.environment}-tellesflorian" | 39 | config.secrets.fullPaths."webapps/${app.environment}-tellesflorian" |
38 | ]; | 40 | ]; |
@@ -134,7 +136,7 @@ in { | |||
134 | 136 | ||
135 | </Directory> | 137 | </Directory> |
136 | '' | 138 | '' |
137 | adminer.apache.vhostConf | 139 | (adminer.apache.vhostConf null) |
138 | ]; | 140 | ]; |
139 | }; | 141 | }; |
140 | }; | 142 | }; |
diff --git a/modules/private/websites/florian/integration.nix b/modules/private/websites/florian/integration.nix index 57c4006..4ee160a 100644 --- a/modules/private/websites/florian/integration.nix +++ b/modules/private/websites/florian/integration.nix | |||
@@ -1,6 +1,6 @@ | |||
1 | { lib, pkgs, config, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | 2 | let |
3 | adminer = pkgs.callPackage ../commons/adminer.nix {}; | 3 | adminer = pkgs.callPackage ../commons/adminer.nix { inherit config; }; |
4 | cfg = config.myServices.websites.florian.integration; | 4 | cfg = config.myServices.websites.florian.integration; |
5 | varDir = "/var/lib/ftp/florian"; | 5 | varDir = "/var/lib/ftp/florian"; |
6 | env = config.myEnv.websites.florian; | 6 | env = config.myEnv.websites.florian; |
@@ -8,7 +8,7 @@ in { | |||
8 | options.myServices.websites.florian.integration.enable = lib.mkEnableOption "enable Florian's website integration"; | 8 | options.myServices.websites.florian.integration.enable = lib.mkEnableOption "enable Florian's website integration"; |
9 | 9 | ||
10 | config = lib.mkIf cfg.enable { | 10 | config = lib.mkIf cfg.enable { |
11 | security.acme2.certs."ftp".extraDomains."florian.immae.eu" = null; | 11 | security.acme.certs."ftp".extraDomains."florian.immae.eu" = null; |
12 | 12 | ||
13 | services.websites.env.integration.modules = adminer.apache.modules; | 13 | services.websites.env.integration.modules = adminer.apache.modules; |
14 | services.websites.env.integration.vhostConfs.florian = { | 14 | services.websites.env.integration.vhostConfs.florian = { |
@@ -17,7 +17,7 @@ in { | |||
17 | hosts = [ "florian.immae.eu" ]; | 17 | hosts = [ "florian.immae.eu" ]; |
18 | root = "${varDir}/florian.immae.eu"; | 18 | root = "${varDir}/florian.immae.eu"; |
19 | extraConfig = [ | 19 | extraConfig = [ |
20 | adminer.apache.vhostConf | 20 | (adminer.apache.vhostConf null) |
21 | '' | 21 | '' |
22 | ServerAdmin ${env.server_admin} | 22 | ServerAdmin ${env.server_admin} |
23 | 23 | ||
diff --git a/modules/private/websites/florian/production.nix b/modules/private/websites/florian/production.nix index 1abc715..16c6022 100644 --- a/modules/private/websites/florian/production.nix +++ b/modules/private/websites/florian/production.nix | |||
@@ -1,6 +1,6 @@ | |||
1 | { lib, pkgs, config, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | 2 | let |
3 | adminer = pkgs.callPackage ../commons/adminer.nix {}; | 3 | adminer = pkgs.callPackage ../commons/adminer.nix { inherit config; }; |
4 | cfg = config.myServices.websites.florian.production; | 4 | cfg = config.myServices.websites.florian.production; |
5 | varDir = "/var/lib/ftp/florian"; | 5 | varDir = "/var/lib/ftp/florian"; |
6 | env = config.myEnv.websites.florian; | 6 | env = config.myEnv.websites.florian; |
@@ -8,7 +8,7 @@ in { | |||
8 | options.myServices.websites.florian.production.enable = lib.mkEnableOption "enable Florian's website production"; | 8 | options.myServices.websites.florian.production.enable = lib.mkEnableOption "enable Florian's website production"; |
9 | 9 | ||
10 | config = lib.mkIf cfg.enable { | 10 | config = lib.mkIf cfg.enable { |
11 | security.acme2.certs."ftp".extraDomains."tellesflorian.com" = null; | 11 | security.acme.certs."ftp".extraDomains."tellesflorian.com" = null; |
12 | 12 | ||
13 | services.websites.env.production.modules = adminer.apache.modules; | 13 | services.websites.env.production.modules = adminer.apache.modules; |
14 | services.websites.env.production.vhostConfs.florian = { | 14 | services.websites.env.production.vhostConfs.florian = { |
@@ -17,7 +17,7 @@ in { | |||
17 | hosts = [ "tellesflorian.com" "www.tellesflorian.com" ]; | 17 | hosts = [ "tellesflorian.com" "www.tellesflorian.com" ]; |
18 | root = "${varDir}/tellesflorian.com"; | 18 | root = "${varDir}/tellesflorian.com"; |
19 | extraConfig = [ | 19 | extraConfig = [ |
20 | adminer.apache.vhostConf | 20 | (adminer.apache.vhostConf null) |
21 | '' | 21 | '' |
22 | ServerAdmin ${env.server_admin} | 22 | ServerAdmin ${env.server_admin} |
23 | 23 | ||