@@ -114,6 +114,21 @@ in {
117+ poolConfig = mkOption {
121+ pm.max_children = 32
122+ pm.start_servers = 2
123+ pm.min_spare_servers = 2
124+ pm.max_spare_servers = 4
125+ pm.max_requests = 500
128+ Options for nextcloud's PHP pool. See the documentation on <literal>php-fpm.conf</literal> for details on configuration directives.
117 config = {
132 config = {
118 dbtype = mkOption {
133 dbtype = mkOption {
119 type = types.enum [ "sqlite" "pgsql" "mysql" ];
134 type = types.enum [ "sqlite" "pgsql" "mysql" ];
@@ -339,11 +354,7 @@ in {
339 listen.group = nginx
354 listen.group = nginx
340 user = nextcloud
355 user = nextcloud
341 group = nginx
356 group = nginx
342− pm = dynamic
357+ ${cfg.poolConfig}
343− pm.max_children = 32
344− pm.start_servers = 2
345− pm.min_spare_servers = 2
346− pm.max_spare_servers = 4
347 env[NEXTCLOUD_CONFIG_DIR] = ${cfg.home}/config
358 env[NEXTCLOUD_CONFIG_DIR] = ${cfg.home}/config
348 env[PATH] = /run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin
359 env[PATH] = /run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin
349 ${phpAdminValues}
360 ${phpAdminValues}