diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2019-09-15 15:35:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-15 15:35:32 +0200 |
commit | 80e2c41b877199301daaddd9583b694f157dfb79 (patch) | |
tree | 7fc93a5d93bd1b2d887df671104f51ae428780da /nixos/modules | |
parent | d26fe3694073ba82f428b9aef36d5b2acf422392 (diff) | |
parent | 56e5dddf7c7420891a89fe227868c4c418e8dc36 (diff) | |
download | nixlib-80e2c41b877199301daaddd9583b694f157dfb79.tar nixlib-80e2c41b877199301daaddd9583b694f157dfb79.tar.gz nixlib-80e2c41b877199301daaddd9583b694f157dfb79.tar.bz2 nixlib-80e2c41b877199301daaddd9583b694f157dfb79.tar.lz nixlib-80e2c41b877199301daaddd9583b694f157dfb79.tar.xz nixlib-80e2c41b877199301daaddd9583b694f157dfb79.tar.zst nixlib-80e2c41b877199301daaddd9583b694f157dfb79.zip |
Merge pull request #68435 from averelld/nextcloud-fix-deprecation-warning
nextcloud: fix deprecation warning
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/web-apps/nextcloud.nix | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 5f5469e48507..db5dc915c89f 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -120,16 +120,24 @@ 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 + poolSettings = mkOption { + type = with types; attrsOf (oneOf [ str int bool ]); + 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. ''; + }; + + poolConfig = mkOption { + type = types.nullOr types.lines; + default = null; description = '' Options for nextcloud's PHP pool. See the documentation on <literal>php-fpm.conf</literal> for details on configuration directives. ''; @@ -287,6 +295,11 @@ in { message = "Please specify exactly one of adminpass or adminpassFile"; } ]; + + warnings = optional (cfg.poolConfig != null) '' + Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release. + Please migrate your configuration to config.services.nextcloud.poolSettings. + ''; } { systemd.timers.nextcloud-cron = { @@ -423,7 +436,7 @@ in { settings = mapAttrs (name: mkDefault) { "listen.owner" = "nginx"; "listen.group" = "nginx"; - }; + } // cfg.poolSettings; extraConfig = cfg.poolConfig; }; }; |