0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge pull request #68435 from averelld/nextcloud-fix-deprecation-warning

nextcloud: fix deprecation warning
This commit is contained in:
Maximilian Bosch 2019-09-15 15:35:32 +02:00 committed by GitHub
commit 80e2c41b87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,16 +120,24 @@ in {
''; '';
}; };
poolConfig = mkOption { poolSettings = mkOption {
type = types.lines; type = with types; attrsOf (oneOf [ str int bool ]);
default = '' default = {
pm = dynamic "pm" = "dynamic";
pm.max_children = 32 "pm.max_children" = "32";
pm.start_servers = 2 "pm.start_servers" = "2";
pm.min_spare_servers = 2 "pm.min_spare_servers" = "2";
pm.max_spare_servers = 4 "pm.max_spare_servers" = "4";
pm.max_requests = 500 "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 = '' description = ''
Options for nextcloud's PHP pool. See the documentation on <literal>php-fpm.conf</literal> for details on configuration directives. 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"; 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 = { { systemd.timers.nextcloud-cron = {
@ -423,7 +436,7 @@ in {
settings = mapAttrs (name: mkDefault) { settings = mapAttrs (name: mkDefault) {
"listen.owner" = "nginx"; "listen.owner" = "nginx";
"listen.group" = "nginx"; "listen.group" = "nginx";
}; } // cfg.poolSettings;
extraConfig = cfg.poolConfig; extraConfig = cfg.poolConfig;
}; };
}; };