Apart from container solution, there are no easy ways to do this.
1. You can patch nixpkgs and add option `phpPackage` per-pool, that
overrides global `phpPackage`
2. You can use `lib.mkForce` like here:
systemd.services.phpfpm-your-pool-name.serviceConfig = lib.mkForce {
Slice = "phpfpm.slice";
PrivateDevices = true;
ProtectSystem = "full";
ProtectHome = true;
NoNewPrivileges = true;
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6";
Type = "notify";
ExecStart = "${phpPackage}/bin/php-fpm -y ${cfgFile} -c ${phpIni}";
ExecReload = "${pkgs.coreutils}/bin/kill -USR2 $MAINPID";
}
but this (2a) breaks abstraction [1] and (2b) requires you to supply your
own ${cfgFile} and ${phpIni}
[1] especially beacuse of https://github.com/NixOS/nixpkgs/issues/23921
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev