+ services.phpfpm.pools = attrsets.mapAttrs' (name: icfg: attrsets.nameValuePair
+ name {
+ listen = cfg.phpListenPaths."${name}";
+ extraConfig = ''
+ user = ${icfg.httpdUser}
+ group = ${icfg.httpdGroup}
+ listen.owner = ${icfg.httpdUser}
+ listen.group = ${icfg.httpdGroup}
+ ${optionalString (icfg.phpSession) ''
+ php_admin_value[session.save_path] = "${icfg.varDir}/phpSessions"''}
+ php_admin_value[open_basedir] = "${builtins.concatStringsSep ":" ([icfg.app icfg.varDir] ++ icfg.phpOpenbasedir)}"
+ '' + icfg.phpPool;
+ phpOptions = config.services.phpfpm.phpOptions + icfg.phpOptions;
+ }
+ ) cfg.apps;
+