]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/chloe/integration.nix
Upgrade nixos
[perso/Immae/Config/Nix.git] / modules / private / websites / chloe / integration.nix
index c42a428250c6542d9a486f0d9aa4989b5859645f..caf6548dbb01a0ab4c48807cb2936e6ae25c6c82 100644 (file)
@@ -1,8 +1,8 @@
-{ lib, pkgs, config, myconfig,  ... }:
+{ lib, pkgs, config,  ... }:
 let
   chloe  = pkgs.callPackage ./builder.nix {
     inherit (pkgs.webapps) chloe;
-    config = myconfig.env.websites.chloe.integration;
+    config = config.myEnv.websites.chloe.integration;
     apacheUser = config.services.httpd.Inte.user;
     apacheGroup = config.services.httpd.Inte.group;
   };
@@ -12,25 +12,32 @@ in {
   options.myServices.websites.chloe.integration.enable = lib.mkEnableOption "enable Chloe's website in integration";
 
   config = lib.mkIf cfg.enable {
+    services.duplyBackup.profiles.chloe_dev.rootDir = chloe.app.varDir;
     secrets.keys = chloe.keys;
     systemd.services.phpfpm-chloe_dev.after = lib.mkAfter chloe.phpFpm.serviceDeps;
     systemd.services.phpfpm-chloe_dev.wants = chloe.phpFpm.serviceDeps;
     services.phpfpm.pools.chloe_dev = {
-      listen = chloe.phpFpm.socket;
-      extraConfig = chloe.phpFpm.pool;
+      user = config.services.httpd.Inte.user;
+      group = config.services.httpd.Inte.group;
+      settings = chloe.phpFpm.pool;
       phpOptions = config.services.phpfpm.phpOptions + ''
         extension=${pkgs.php}/lib/php/extensions/mysqli.so
       '';
     };
     system.activationScripts.chloe_dev = chloe.activationScript;
     myServices.websites.webappDirs."${chloe.apache.webappName}" = chloe.app.webRoot;
-    services.websites.integration.modules = chloe.apache.modules;
-    services.websites.integration.vhostConfs.chloe = {
-      certName    = "eldiron";
+    services.websites.env.integration.modules = chloe.apache.modules;
+    services.websites.env.integration.vhostConfs.chloe = {
+      certName    = "integration";
       addToCerts  = true;
       hosts       = ["chloe.immae.eu" ];
       root        = chloe.apache.root;
-      extraConfig = [ chloe.apache.vhostConf ];
+      extraConfig = [
+        (chloe.apache.vhostConf config.services.phpfpm.pools.chloe_dev.socket)
+      ];
     };
+    services.websites.env.integration.watchPaths = [
+      "/var/secrets/webapps/${chloe.app.environment}-chloe"
+    ];
   };
 }