]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/chloe/default.nix
Remove direct dependency to myconfig in database modules
[perso/Immae/Config/Nix.git] / nixops / modules / websites / chloe / default.nix
index ea984aef0b8cbaf2fa2509f8cfa87ae6d5ac9916..8e801b59b2d918d3357919ec9ff96163fe42c145 100644 (file)
@@ -1,11 +1,11 @@
 { lib, pkgs, config, myconfig,  ... }:
 let
   chloe_dev  = pkgs.callPackage ./chloe.nix {
-    inherit (pkgs.private.webapps) chloe;
+    inherit (pkgs.webapps) chloe;
     config = myconfig.env.websites.chloe.integration;
   };
   chloe_prod = pkgs.callPackage ./chloe.nix {
-    inherit (pkgs.private.webapps) chloe;
+    inherit (pkgs.webapps) chloe;
     config = myconfig.env.websites.chloe.production;
   };
 
@@ -25,13 +25,6 @@ in {
       secrets.keys = chloe_prod.keys;
       services.webstats.sites = [ { name = "osteopathe-cc.fr"; } ];
 
-      security.acme.certs."chloe" = config.services.myCertificates.certConfig // {
-        domain = "osteopathe-cc.fr";
-        extraDomains = {
-          "www.osteopathe-cc.fr" = null;
-        };
-      };
-
       services.myPhpfpm.serviceDependencies.chloe_prod = chloe_prod.phpFpm.serviceDeps;
       services.myPhpfpm.poolConfigs.chloe_prod = chloe_prod.phpFpm.pool;
       services.myPhpfpm.poolPhpConfigs.chloe_prod = ''
@@ -42,17 +35,17 @@ in {
         mkdir -p $out/webapps
         ln -s ${chloe_prod.app.webRoot} $out/webapps/${chloe_prod.apache.webappName}
         '';
-      services.myWebsites.production.modules = chloe_prod.apache.modules;
-      services.myWebsites.production.vhostConfs.chloe = {
-        certName    = "chloe";
-        hosts       = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ];
-        root        = chloe_prod.apache.root;
-        extraConfig = [ chloe_prod.apache.vhostConf ];
+      services.websites.production.modules = chloe_prod.apache.modules;
+      services.websites.production.vhostConfs.chloe = {
+        certName     = "chloe";
+        certMainHost = "osteopathe-cc.fr";
+        hosts        = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ];
+        root         = chloe_prod.apache.root;
+        extraConfig  = [ chloe_prod.apache.vhostConf ];
       };
     })
     (lib.mkIf cfg.integration.enable {
       secrets.keys = chloe_dev.keys;
-      security.acme.certs."eldiron".extraDomains."chloe.immae.eu" = null;
       services.myPhpfpm.serviceDependencies.chloe_dev = chloe_dev.phpFpm.serviceDeps;
       services.myPhpfpm.poolConfigs.chloe_dev = chloe_dev.phpFpm.pool;
       services.myPhpfpm.poolPhpConfigs.chloe_dev = ''
@@ -63,9 +56,10 @@ in {
         mkdir -p $out/webapps
         ln -s ${chloe_dev.app.webRoot} $out/webapps/${chloe_dev.apache.webappName}
         '';
-      services.myWebsites.integration.modules = chloe_dev.apache.modules;
-      services.myWebsites.integration.vhostConfs.chloe = {
+      services.websites.integration.modules = chloe_dev.apache.modules;
+      services.websites.integration.vhostConfs.chloe = {
         certName    = "eldiron";
+        addToCerts  = true;
         hosts       = ["chloe.immae.eu" ];
         root        = chloe_dev.apache.root;
         extraConfig = [ chloe_dev.apache.vhostConf ];