X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fchloe%2Fintegration.nix;h=75e25afbae83ad4aa5a7c7057c6624a67c2d5ed2;hb=6a8252b11bb02f3e67857d5a9d733b1affa6a625;hp=458e41450dc8fb990208ea4d46baf594be5a1233;hpb=f8026b6e4c869aa108f6361c8ccd50890657994d;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/chloe/integration.nix b/modules/private/websites/chloe/integration.nix index 458e414..75e25af 100644 --- a/modules/private/websites/chloe/integration.nix +++ b/modules/private/websites/chloe/integration.nix @@ -12,24 +12,29 @@ in { options.myServices.websites.chloe.integration.enable = lib.mkEnableOption "enable Chloe's website in integration"; config = lib.mkIf cfg.enable { + services.backup.profiles.chloe_dev.rootDir = chloe.app.varDir; secrets.keys = chloe.keys; - services.myPhpfpm.serviceDependencies.chloe_dev = chloe.phpFpm.serviceDeps; - services.myPhpfpm.poolConfigs.chloe_dev = chloe.phpFpm.pool; - services.myPhpfpm.poolPhpConfigs.chloe_dev = '' - extension=${pkgs.php}/lib/php/extensions/mysqli.so + systemd.services.phpfpm-chloe_dev.after = lib.mkAfter chloe.phpFpm.serviceDeps; + systemd.services.phpfpm-chloe_dev.wants = chloe.phpFpm.serviceDeps; + services.phpfpm.pools.chloe_dev = { + listen = chloe.phpFpm.socket; + extraConfig = chloe.phpFpm.pool; + phpOptions = config.services.phpfpm.phpOptions + '' + extension=${pkgs.php}/lib/php/extensions/mysqli.so ''; + }; 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" + ]; }; }