{ pkgs, config, phpFpmListen, processSettings, phpPackage, user, group }: let lib = pkgs.lib; in { inherit user group phpPackage; settings = { "listen.owner" = config.services.nginx.user; "listen.group" = config.services.nginx.group; "listen.mode" = 660; "pm" = "dynamic"; "catch_workers_output" = "yes"; } // lib.mapAttrs' (name: v: lib.nameValuePair "pm.${name}" v) (processSettings.__unfix__ processSettings); # obscure magic. listen = phpFpmListen; }