]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - virtual/modules/websites/chloe.nix
Move websites to their own modules: php config and scripts
[perso/Immae/Config/Nix.git] / virtual / modules / websites / chloe.nix
index 2c0c65ddb611c9ac15fdeb296a3fc6f2641224f6..9b5c5cab0d4b014ec5aa1420fadc994ce9f86769 100644 (file)
@@ -1,5 +1,9 @@
 { lib, pkgs, config, mylibs, ... }:
 let
+    chloe = pkgs.callPackage ../../packages/chloe.nix { inherit (mylibs) checkEnv fetchedGitPrivate; };
+    chloe_dev = chloe { environment = "dev"; };
+    chloe_prod = chloe { environment = "prod"; };
+
     cfg = config.services.myWebsites.Chloe;
 in {
   options.services.myWebsites.Chloe = {
@@ -19,9 +23,14 @@ in {
           "www.osteopathe-cc.fr" = null;
         };
       };
+
+      services.phpfpm.poolConfigs.chloe_prod = chloe_prod.phpFpm.pool;
+      system.activationScripts.chloe_prod = chloe_prod.activationScript;
     })
     (lib.mkIf cfg.integration.enable {
       security.acme.certs."eldiron".extraDomains."chloe.immae.eu" = null;
+      services.phpfpm.poolConfigs.chloe_dev = chloe_dev.phpFpm.pool;
+      system.activationScripts.chloe_dev = chloe_dev.activationScript;
     })
   ];
 }