X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2Fmodules%2Fwebsites%2Fchloe%2Fdefault.nix;h=874b81bedce9a7111a9eb70edf457a9039b0d212;hb=7667c367033b15582cf383da62446f78e66a59ef;hp=451a248e8ddccf267d51e928fe5cbb7ecea3f2b5;hpb=906065a0b7aada3282309791a051e71e5e1cf16d;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/nixops/modules/websites/chloe/default.nix b/nixops/modules/websites/chloe/default.nix index 451a248..874b81b 100644 --- a/nixops/modules/websites/chloe/default.nix +++ b/nixops/modules/websites/chloe/default.nix @@ -1,14 +1,15 @@ { lib, pkgs, config, myconfig, mylibs, ... }: let - chloe = pkgs.callPackage ./chloe.nix { inherit (mylibs) fetchedGitPrivate; }; - chloe_dev = chloe { - config = myconfig.env.websites.chloe.integration; - }; - chloe_prod = chloe { - config = myconfig.env.websites.chloe.production; - }; + chloe_dev = pkgs.callPackage ./chloe.nix { + inherit (pkgs.private.webapps) chloe; + config = myconfig.env.websites.chloe.integration; + }; + chloe_prod = pkgs.callPackage ./chloe.nix { + inherit (pkgs.private.webapps) chloe; + config = myconfig.env.websites.chloe.production; + }; - cfg = config.services.myWebsites.Chloe; + cfg = config.services.myWebsites.Chloe; in { options.services.myWebsites.Chloe = { production = { @@ -19,20 +20,10 @@ in { }; }; - imports = [ - ../commons/stats.nix - ]; - config = lib.mkMerge [ (lib.mkIf cfg.production.enable { - deployment.keys = chloe_prod.keys; - services.myWebsites.commons.stats.enable = true; - services.myWebsites.commons.stats.sites = [ - { - name = "osteopathe-cc.fr"; - conf = ./goaccess.conf; - } - ]; + secrets.keys = chloe_prod.keys; + services.webstats.sites = [ { name = "osteopathe-cc.fr"; } ]; security.acme.certs."chloe" = config.services.myCertificates.certConfig // { domain = "osteopathe-cc.fr"; @@ -49,7 +40,7 @@ in { system.activationScripts.chloe_prod = chloe_prod.activationScript; system.extraSystemBuilderCmds = '' mkdir -p $out/webapps - ln -s ${chloe_prod.webRoot} $out/webapps/${chloe_prod.apache.webappName} + 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 = { @@ -60,7 +51,7 @@ in { }; }) (lib.mkIf cfg.integration.enable { - deployment.keys = chloe_dev.keys; + 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; @@ -70,7 +61,7 @@ in { system.activationScripts.chloe_dev = chloe_dev.activationScript; system.extraSystemBuilderCmds = '' mkdir -p $out/webapps - ln -s ${chloe_dev.webRoot} $out/webapps/${chloe_dev.apache.webappName} + 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 = {