summary refs log tree commit diff
path: root/nixos/modules/services/web-apps
diff options
context:
space:
mode:
authorVictor SENE <Vskilet@users.noreply.github.com>2018-10-11 16:13:23 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2018-10-11 14:13:23 +0000
commit2dcd512e7431001c7c0b80db60f524e2893c7654 (patch)
tree273caa1ccb3ee117b12b3ff65d5096310eeb5353 /nixos/modules/services/web-apps
parent0aabc77a0336ad4efba606af22cd83e9478e1721 (diff)
downloadnixlib-2dcd512e7431001c7c0b80db60f524e2893c7654.tar
nixlib-2dcd512e7431001c7c0b80db60f524e2893c7654.tar.gz
nixlib-2dcd512e7431001c7c0b80db60f524e2893c7654.tar.bz2
nixlib-2dcd512e7431001c7c0b80db60f524e2893c7654.tar.lz
nixlib-2dcd512e7431001c7c0b80db60f524e2893c7654.tar.xz
nixlib-2dcd512e7431001c7c0b80db60f524e2893c7654.tar.zst
nixlib-2dcd512e7431001c7c0b80db60f524e2893c7654.zip
nixos/nextcloud: add poolConfig option (#48094)
Diffstat (limited to 'nixos/modules/services/web-apps')
-rw-r--r--nixos/modules/services/web-apps/nextcloud.nix21
1 files changed, 16 insertions, 5 deletions
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 <literal>php-fpm.conf</literal> 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}