X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fchloe%2Fintegration.nix;h=273d1fcc3cd25c855b469419a748ba6462c6783a;hb=ab8f306d7c2c49b8116e1af7b355ed2384617ed9;hp=d49a85c084cfc473528943630a3ae0f90602cae8;hpb=f40f5b235b890f46770a22f005f8a0f664cf0562;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/chloe/integration.nix b/modules/private/websites/chloe/integration.nix index d49a85c..273d1fc 100644 --- a/modules/private/websites/chloe/integration.nix +++ b/modules/private/websites/chloe/integration.nix @@ -1,8 +1,8 @@ -{ lib, pkgs, config, myconfig, ... }: +{ lib, pkgs, config, ... }: let chloe = pkgs.callPackage ./builder.nix { inherit (pkgs.webapps) chloe; - config = myconfig.env.websites.chloe.integration; + config = config.myEnv.websites.chloe.integration; apacheUser = config.services.httpd.Inte.user; apacheGroup = config.services.httpd.Inte.group; }; @@ -12,6 +12,7 @@ in { options.myServices.websites.chloe.integration.enable = lib.mkEnableOption "enable Chloe's website in integration"; config = lib.mkIf cfg.enable { + services.duplyBackup.profiles.chloe_dev.rootDir = chloe.app.varDir; secrets.keys = chloe.keys; systemd.services.phpfpm-chloe_dev.after = lib.mkAfter chloe.phpFpm.serviceDeps; systemd.services.phpfpm-chloe_dev.wants = chloe.phpFpm.serviceDeps; @@ -23,17 +24,17 @@ in { ''; }; system.activationScripts.chloe_dev = chloe.activationScript; - system.extraSystemBuilderCmds = '' - mkdir -p $out/webapps - ln -s ${chloe.app.webRoot} $out/webapps/${chloe.apache.webappName} - ''; - services.websites.integration.modules = chloe.apache.modules; - services.websites.integration.vhostConfs.chloe = { + myServices.websites.webappDirs."${chloe.apache.webappName}" = chloe.app.webRoot; + services.websites.env.integration.modules = chloe.apache.modules; + services.websites.env.integration.vhostConfs.chloe = { certName = "eldiron"; addToCerts = true; hosts = ["chloe.immae.eu" ]; root = chloe.apache.root; extraConfig = [ chloe.apache.vhostConf ]; }; + services.websites.env.integration.watchPaths = [ + "/var/secrets/webapps/${chloe.app.environment}-chloe" + ]; }; }