aboutsummaryrefslogtreecommitdiff
path: root/modules/private
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-06-01 12:46:35 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-06-01 12:46:35 +0200
commit2e48907d64491a06454b342a1a56d03a0835753d (patch)
treefe666cc9f58135b5691a34d2a1e8b57d978d8d35 /modules/private
parentf4da0504f34817e39350ff7db2bc7e7e94992a03 (diff)
downloadNix-2e48907d64491a06454b342a1a56d03a0835753d.tar.gz
Nix-2e48907d64491a06454b342a1a56d03a0835753d.tar.zst
Nix-2e48907d64491a06454b342a1a56d03a0835753d.zip
Start moving php configuration to a dedicated module
Diffstat (limited to 'modules/private')
-rw-r--r--modules/private/websites/aten/integration.nix28
1 files changed, 18 insertions, 10 deletions
diff --git a/modules/private/websites/aten/integration.nix b/modules/private/websites/aten/integration.nix
index 384b324..f8d8b53 100644
--- a/modules/private/websites/aten/integration.nix
+++ b/modules/private/websites/aten/integration.nix
@@ -12,14 +12,26 @@ in {
12 options.myServices.websites.aten.integration.enable = lib.mkEnableOption "enable Aten's website in integration"; 12 options.myServices.websites.aten.integration.enable = lib.mkEnableOption "enable Aten's website in integration";
13 13
14 config = lib.mkIf cfg.enable { 14 config = lib.mkIf cfg.enable {
15 services.phpApplication.aten_dev = let
16 app = pkgs.webapps.aten.override { environment = "dev"; };
17 in {
18 websiteEnv = "integration";
19 httpdUser = config.services.httpd.Inte.user;
20 httpdGroup = config.services.httpd.Inte.group;
21 inherit (app) webRoot varDir;
22 inherit app;
23 serviceDeps = [ "postgresql.service" ];
24 preStartActions = [
25 "APP_ENV=${app.environment} ./bin/console --env=${app.environment} cache:clear --no-warmup"
26 ];
27 watchFiles = [
28 "${config.secrets.location}/webapps/${app.environment}-aten"
29 ];
30 webappName = "aten_dev";
31 };
32
15 secrets.keys = aten.keys; 33 secrets.keys = aten.keys;
16 systemd.services.phpfpm-aten_dev.preStart = lib.mkAfter aten.phpFpm.preStart;
17 systemd.services.phpfpm-aten_dev.after = lib.mkAfter aten.phpFpm.serviceDeps;
18 systemd.services.phpfpm-aten_dev.wants = aten.phpFpm.serviceDeps;
19 services.phpfpm.poolConfigs.aten_dev = aten.phpFpm.pool; 34 services.phpfpm.poolConfigs.aten_dev = aten.phpFpm.pool;
20 system.activationScripts.aten_dev = aten.activationScript;
21 myServices.websites.webappDirs."${aten.apache.webappName}" = aten.app.webRoot;
22 services.websites.integration.modules = aten.apache.modules;
23 services.websites.integration.vhostConfs.aten = { 35 services.websites.integration.vhostConfs.aten = {
24 certName = "eldiron"; 36 certName = "eldiron";
25 addToCerts = true; 37 addToCerts = true;
@@ -27,9 +39,5 @@ in {
27 root = aten.apache.root; 39 root = aten.apache.root;
28 extraConfig = [ aten.apache.vhostConf ]; 40 extraConfig = [ aten.apache.vhostConf ];
29 }; 41 };
30 services.websites.integration.watchPaths = [
31 "/var/secrets/webapps/${aten.app.environment}-aten"
32 ];
33 }; 42 };
34} 43}
35