From 2dcd512e7431001c7c0b80db60f524e2893c7654 Mon Sep 17 00:00:00 2001 From: Victor SENE Date: Thu, 11 Oct 2018 16:13:23 +0200 Subject: nixos/nextcloud: add poolConfig option (#48094) --- nixos/modules/services/web-apps/nextcloud.nix | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'nixos/modules/services/web-apps') diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 44c3df1d057b..db4c8e1a3d85 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -114,6 +114,21 @@ in { ''; }; + poolConfig = mkOption { + type = types.lines; + default = '' + pm = dynamic + pm.max_children = 32 + pm.start_servers = 2 + pm.min_spare_servers = 2 + pm.max_spare_servers = 4 + pm.max_requests = 500 + ''; + description = '' + Options for nextcloud's PHP pool. See the documentation on php-fpm.conf for details on configuration directives. + ''; + }; + config = { dbtype = mkOption { type = types.enum [ "sqlite" "pgsql" "mysql" ]; @@ -339,11 +354,7 @@ in { listen.group = nginx user = nextcloud group = nginx - pm = dynamic - pm.max_children = 32 - pm.start_servers = 2 - pm.min_spare_servers = 2 - pm.max_spare_servers = 4 + ${cfg.poolConfig} env[NEXTCLOUD_CONFIG_DIR] = ${cfg.home}/config env[PATH] = /run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin ${phpAdminValues} -- cgit 1.4.1