From 5dd14a1059efcc26193cc37e61b8da94a25cbba9 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 10 Apr 2014 07:52:26 +0200 Subject: [PATCH] nixos/phpfpm: Add option to set PHP package. This allows to easily override the used PHP package, especially for example if you want to use PHP 5.5 or if you want to override the derivation. Signed-off-by: aszlig --- nixos/modules/services/web-servers/phpfpm.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/web-servers/phpfpm.nix b/nixos/modules/services/web-servers/phpfpm.nix index 76ec41244627..6ffe4beaa5d5 100644 --- a/nixos/modules/services/web-servers/phpfpm.nix +++ b/nixos/modules/services/web-servers/phpfpm.nix @@ -35,6 +35,13 @@ in { ''; }; + phpPackage = mkOption { + default = pkgs.php54; + description = '' + The PHP package to use for running the FPM service. + ''; + }; + poolConfigs = mkOption { type = types.attrsOf types.lines; default = {}; @@ -68,7 +75,7 @@ in { mkdir -p "${stateDir}" ''; serviceConfig = { - ExecStart = "${pkgs.php54}/sbin/php-fpm -y ${cfgFile}"; + ExecStart = "${cfg.phpPackage}/sbin/php-fpm -y ${cfgFile}"; PIDFile = pidFile; }; };