X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2Fmodules%2Fwebsites%2Fpiedsjaloux%2Fdefault.nix;h=10c1f6c91eb31d18c464029daeac4287a8195809;hb=8f904d0d982684e8e66dfc5d9123712eb96bf16e;hp=165791416bf876583f1acb4190a1a9bb85bc4d6c;hpb=b7ee93fcdee2509cd4c0caec2c5c59ccff5bab2c;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/nixops/modules/websites/piedsjaloux/default.nix b/nixops/modules/websites/piedsjaloux/default.nix index 1657914..10c1f6c 100644 --- a/nixops/modules/websites/piedsjaloux/default.nix +++ b/nixops/modules/websites/piedsjaloux/default.nix @@ -1,14 +1,15 @@ -{ lib, pkgs, config, myconfig, mylibs, ... }: +{ lib, pkgs, config, myconfig, ... }: let - piedsjaloux = pkgs.callPackage ./piedsjaloux.nix { inherit (mylibs) fetchedGitPrivate; }; - piedsjaloux_dev = piedsjaloux { - config = myconfig.env.websites.piedsjaloux.integration; - }; - piedsjaloux_prod = piedsjaloux { - config = myconfig.env.websites.piedsjaloux.production; - }; + piedsjaloux_dev = pkgs.callPackage ./piedsjaloux.nix { + inherit (pkgs.webapps) piedsjaloux; + config = myconfig.env.websites.piedsjaloux.integration; + }; + piedsjaloux_prod = pkgs.callPackage ./piedsjaloux.nix { + inherit (pkgs.webapps) piedsjaloux; + config = myconfig.env.websites.piedsjaloux.production; + }; - cfg = config.services.myWebsites.PiedsJaloux; + cfg = config.services.myWebsites.PiedsJaloux; in { options.services.myWebsites.PiedsJaloux = { production = { @@ -19,17 +20,10 @@ in { }; }; - imports = [ - ../commons/stats.nix - ]; - config = lib.mkMerge [ (lib.mkIf cfg.production.enable { secrets.keys = piedsjaloux_prod.keys; - services.myWebsites.commons.stats.enable = true; - services.myWebsites.commons.stats.sites = [ - { name = "piedsjaloux.fr"; } - ]; + services.webstats.sites = [ { name = "piedsjaloux.fr"; } ]; security.acme.certs."piedsjaloux" = config.services.myCertificates.certConfig // { domain = "piedsjaloux.fr"; @@ -44,7 +38,7 @@ in { system.activationScripts.piedsjaloux_prod = piedsjaloux_prod.activationScript; system.extraSystemBuilderCmds = '' mkdir -p $out/webapps - ln -s ${piedsjaloux_prod.webRoot} $out/webapps/${piedsjaloux_prod.apache.webappName} + ln -s ${piedsjaloux_prod.app.webRoot} $out/webapps/${piedsjaloux_prod.apache.webappName} ''; services.myWebsites.production.modules = piedsjaloux_prod.apache.modules; services.myWebsites.production.vhostConfs.piedsjaloux = { @@ -63,7 +57,7 @@ in { system.activationScripts.piedsjaloux_dev = piedsjaloux_dev.activationScript; system.extraSystemBuilderCmds = '' mkdir -p $out/webapps - ln -s ${piedsjaloux_dev.webRoot} $out/webapps/${piedsjaloux_dev.apache.webappName} + ln -s ${piedsjaloux_dev.app.webRoot} $out/webapps/${piedsjaloux_dev.apache.webappName} ''; services.myWebsites.integration.modules = piedsjaloux_dev.apache.modules; services.myWebsites.integration.vhostConfs.piedsjaloux = {