2021-11-22 22:19:31 +01:00
|
|
|
{ pkgs, config, phpFpmListen, processSettings, phpPackage }:
|
2021-11-22 22:28:17 +01:00
|
|
|
let
|
|
|
|
lib = pkgs.lib;
|
|
|
|
in
|
2021-11-22 21:39:44 +01:00
|
|
|
{
|
|
|
|
inherit (config.services.nginx) user group;
|
2021-11-22 22:19:31 +01:00
|
|
|
inherit phpPackage;
|
2021-11-22 21:39:44 +01:00
|
|
|
settings = {
|
|
|
|
"listen.owner" = config.services.nginx.user;
|
|
|
|
"listen.group" = config.services.nginx.group;
|
|
|
|
"listen.mode" = 660;
|
|
|
|
"pm" = "dynamic";
|
|
|
|
"catch_workers_output" = "yes";
|
2021-11-22 22:28:17 +01:00
|
|
|
} // lib.mapAttrs' (name: v: lib.nameValuePair "pm.${name}" v) (processSettings.__unfix__ processSettings); # obscure magic.
|
2021-11-22 21:39:44 +01:00
|
|
|
listen = phpFpmListen;
|
|
|
|
}
|