diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix index 9a6ca6fa9635..c58832daac19 100644 --- a/nixos/modules/services/mail/roundcube.nix +++ b/nixos/modules/services/mail/roundcube.nix @@ -256,8 +256,8 @@ in upload_max_filesize = ${cfg.maxAttachmentSize} ''; settings = lib.mapAttrs (name: lib.mkDefault) { - "listen.owner" = "nginx"; - "listen.group" = "nginx"; + "listen.owner" = config.services.nginx.user; + "listen.group" = config.services.nginx.group; "listen.mode" = "0660"; "pm" = "dynamic"; "pm.max_children" = 75; diff --git a/nixos/modules/services/web-apps/baikal.nix b/nixos/modules/services/web-apps/baikal.nix index 1c3f89c510d2..568f250df0df 100644 --- a/nixos/modules/services/web-apps/baikal.nix +++ b/nixos/modules/services/web-apps/baikal.nix @@ -57,8 +57,8 @@ in "BAIKAL_PATH_SPECIFIC" = "/var/lib/baikal/specific/"; }; settings = lib.mapAttrs (name: lib.mkDefault) { - "listen.owner" = "nginx"; - "listen.group" = "nginx"; + "listen.owner" = config.services.nginx.user; + "listen.group" = config.services.nginx.group; "listen.mode" = "0600"; "pm" = "dynamic"; "pm.max_children" = 75; diff --git a/nixos/modules/services/web-apps/grocy.nix b/nixos/modules/services/web-apps/grocy.nix index 8106cc06fd2b..a6860a0902b3 100644 --- a/nixos/modules/services/web-apps/grocy.nix +++ b/nixos/modules/services/web-apps/grocy.nix @@ -44,7 +44,7 @@ in "pm" = "dynamic"; "php_admin_value[error_log]" = "stderr"; "php_admin_flag[log_errors]" = true; - "listen.owner" = "nginx"; + "listen.owner" = config.services.nginx.user; "catch_workers_output" = true; "pm.max_children" = "32"; "pm.start_servers" = "2"; @@ -52,6 +52,20 @@ in "pm.max_spare_servers" = "4"; "pm.max_requests" = "500"; }; + defaultText = lib.literalExpression '' + { + "pm" = "dynamic"; + "php_admin_value[error_log]" = "stderr"; + "php_admin_flag[log_errors]" = true; + "listen.owner" = config.services.nginx.user; + "catch_workers_output" = true; + "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 grocy's PHPFPM pool. diff --git a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix index 597d4951a0db..b7d9dd3dbfe1 100644 --- a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix +++ b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix @@ -200,8 +200,8 @@ in date.timezone = "${cfg.timezone}" ''; settings = mapAttrs (name: mkDefault) { - "listen.owner" = "nginx"; - "listen.group" = "nginx"; + "listen.owner" = config.services.nginx.user; + "listen.group" = config.services.nginx.group; "listen.mode" = "0600"; "pm" = "dynamic"; "pm.max_children" = 75; diff --git a/nixos/modules/services/web-apps/kanboard.nix b/nixos/modules/services/web-apps/kanboard.nix index 4f541a712853..8318282ecdd2 100644 --- a/nixos/modules/services/web-apps/kanboard.nix +++ b/nixos/modules/services/web-apps/kanboard.nix @@ -123,7 +123,7 @@ in "pm" = "dynamic"; "php_admin_value[error_log]" = "stderr"; "php_admin_flag[log_errors]" = true; - "listen.owner" = "nginx"; + "listen.owner" = config.services.nginx.user; "catch_workers_output" = true; "pm.max_children" = "32"; "pm.start_servers" = "2"; diff --git a/nixos/modules/services/web-apps/selfoss.nix b/nixos/modules/services/web-apps/selfoss.nix index f4aa61a4c910..6c1d4a0f46e5 100644 --- a/nixos/modules/services/web-apps/selfoss.nix +++ b/nixos/modules/services/web-apps/selfoss.nix @@ -37,7 +37,8 @@ in user = mkOption { type = types.str; - default = "nginx"; + default = config.services.nginx.user; + defaultText = lib.literalExpression "config.services.nginx.user"; description = '' User account under which both the service and the web-application run. ''; @@ -122,10 +123,10 @@ in config = mkIf cfg.enable { services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") { ${poolName} = { - user = "nginx"; + user = config.services.nginx.user; settings = mapAttrs (name: mkDefault) { - "listen.owner" = "nginx"; - "listen.group" = "nginx"; + "listen.owner" = config.services.nginx.user; + "listen.group" = config.services.nginx.group; "listen.mode" = "0600"; "pm" = "dynamic"; "pm.max_children" = 75; diff --git a/nixos/modules/services/web-apps/tt-rss.nix b/nixos/modules/services/web-apps/tt-rss.nix index 607b99537f30..eb33661a8637 100644 --- a/nixos/modules/services/web-apps/tt-rss.nix +++ b/nixos/modules/services/web-apps/tt-rss.nix @@ -594,8 +594,8 @@ in inherit (cfg) user; inherit phpPackage; settings = mapAttrs (name: mkDefault) { - "listen.owner" = "nginx"; - "listen.group" = "nginx"; + "listen.owner" = config.services.nginx.user; + "listen.group" = config.services.nginx.group; "listen.mode" = "0600"; "pm" = "dynamic"; "pm.max_children" = 75;