X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fleila%2Fproduction.nix;h=b48da6ff57ec773061d96b832ced21af33691013;hb=d3452fc59b9839846225fd254926c64a9c71f071;hp=4390d592d7e99039bc70ccaf45eba24c6183ef08;hpb=2a670f71df0e7ac61395823827afe16476f6d5b7;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/leila/production.nix b/modules/private/websites/leila/production.nix index 4390d59..b48da6f 100644 --- a/modules/private/websites/leila/production.nix +++ b/modules/private/websites/leila/production.nix @@ -2,23 +2,26 @@ let cfg = config.myServices.websites.leila.production; varDir = "/var/lib/ftp/leila"; + apacheUser = config.services.httpd.Prod.user; + apacheGroup = config.services.httpd.Prod.group; in { options.myServices.websites.leila.production.enable = lib.mkEnableOption "enable Leila's websites in production"; config = lib.mkIf cfg.enable { - services.phpfpm.poolConfigs.leila = '' - listen = /run/phpfpm/leila.sock - user = wwwrun - group = wwwrun - listen.owner = wwwrun - listen.group = wwwrun + services.phpfpm.pools.leila = { + user = apacheUser; + group = apacheGroup; + settings = { + "listen.owner" = apacheUser; + "listen.group" = apacheGroup; - pm = ondemand - pm.max_children = 5 - pm.process_idle_timeout = 60 + "pm" = "ondemand"; + "pm.max_children" = "5"; + "pm.process_idle_timeout" = "60"; - php_admin_value[open_basedir] = "${varDir}:/tmp" - ''; + "php_admin_value[open_basedir]" = "${varDir}:/tmp"; + }; + }; services.webstats.sites = [ { name = "leila.bouya.org"; } @@ -44,7 +47,7 @@ in { Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu - SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost" + SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost" '' @@ -64,7 +67,7 @@ in { AllowOverride None - SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost" + SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost" '' @@ -87,7 +90,7 @@ in { Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu - SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost" + SetHandler "proxy:unix:${config.services.phpfpm.pools.leila.socket}|fcgi://localhost"