[Nix-dev] Use PHP FPM with 2 PHP versions simultaneously
Danylo Hlynskyi
abcz2.uprola at gmail.com
Thu Apr 6 11:29:50 CEST 2017
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20170406/0514e55e/attachment.html>
More information about the nix-dev
mailing list