X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2Fmodules%2Fwebsites%2Fpiedsjaloux%2Fdefault.nix;h=6ffb19c034547ca6d7cf78aa2f701a780b0e0f60;hb=daf64e3f7de98e4267823d14fa34891b27b5f657;hp=9f9697d26dc0c18ef0ff9d51045b32144d7de96f;hpb=9eae2b47b7b315b05a0e010f3003bd875685e260;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/nixops/modules/websites/piedsjaloux/default.nix b/nixops/modules/websites/piedsjaloux/default.nix index 9f9697d..6ffb19c 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 = { @@ -37,10 +38,10 @@ 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 = { + services.websites.production.modules = piedsjaloux_prod.apache.modules; + services.websites.production.vhostConfs.piedsjaloux = { certName = "piedsjaloux"; hosts = [ "piedsjaloux.fr" "www.piedsjaloux.fr" ]; root = piedsjaloux_prod.apache.root; @@ -56,10 +57,10 @@ 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 = { + services.websites.integration.modules = piedsjaloux_dev.apache.modules; + services.websites.integration.vhostConfs.piedsjaloux = { certName = "eldiron"; hosts = [ "piedsjaloux.immae.eu" ]; root = piedsjaloux_dev.apache.root;