X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fchloe%2Fproduction.nix;h=0562de8d2f825f3fc6ea670aa4c4e444111d143f;hb=d2e703c560bc029c3d607058de2935bbf1cb0559;hp=0eafebdc6e76d41160b8b5f8527252536ed52deb;hpb=f8026b6e4c869aa108f6361c8ccd50890657994d;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/chloe/production.nix b/modules/private/websites/chloe/production.nix index 0eafebd..0562de8 100644 --- a/modules/private/websites/chloe/production.nix +++ b/modules/private/websites/chloe/production.nix @@ -12,26 +12,31 @@ in { options.myServices.websites.chloe.production.enable = lib.mkEnableOption "enable Chloe's website in production"; config = lib.mkIf cfg.enable { + services.duplyBackup.profiles.chloe_prod.rootDir = chloe.app.varDir; secrets.keys = chloe.keys; services.webstats.sites = [ { name = "osteopathe-cc.fr"; } ]; - services.myPhpfpm.serviceDependencies.chloe_prod = chloe.phpFpm.serviceDeps; - services.myPhpfpm.poolConfigs.chloe_prod = chloe.phpFpm.pool; - services.myPhpfpm.poolPhpConfigs.chloe_prod = '' - extension=${pkgs.php}/lib/php/extensions/mysqli.so + systemd.services.phpfpm-chloe_prod.after = lib.mkAfter chloe.phpFpm.serviceDeps; + systemd.services.phpfpm-chloe_prod.wants = chloe.phpFpm.serviceDeps; + services.phpfpm.pools.chloe_prod = { + listen = chloe.phpFpm.socket; + extraConfig = chloe.phpFpm.pool; + phpOptions = config.services.phpfpm.phpOptions + '' + extension=${pkgs.php}/lib/php/extensions/mysqli.so ''; + }; system.activationScripts.chloe_prod = chloe.activationScript; - system.extraSystemBuilderCmds = '' - mkdir -p $out/webapps - ln -s ${chloe.app.webRoot} $out/webapps/${chloe.apache.webappName} - ''; - services.websites.production.modules = chloe.apache.modules; - services.websites.production.vhostConfs.chloe = { + myServices.websites.webappDirs."${chloe.apache.webappName}" = chloe.app.webRoot; + services.websites.env.production.modules = chloe.apache.modules; + services.websites.env.production.vhostConfs.chloe = { certName = "chloe"; certMainHost = "osteopathe-cc.fr"; hosts = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ]; root = chloe.apache.root; extraConfig = [ chloe.apache.vhostConf ]; }; + services.websites.env.production.watchPaths = [ + "/var/secrets/webapps/${chloe.app.environment}-chloe" + ]; }; }