diff options
author | Joachim Fasting <joachifm@users.noreply.github.com> | 2016-05-05 19:16:04 +0200 |
---|---|---|
committer | Joachim Fasting <joachifm@users.noreply.github.com> | 2016-05-05 19:16:04 +0200 |
commit | 23fd70b71951b7b1446d7803e714bf55a291d694 (patch) | |
tree | fa11bf9f1377ebc0e3497831eb2def15e387ae7b /nixos | |
parent | ebba6571fe252cc7df99c78891860cf1d1dd0955 (diff) | |
parent | a8bc5b67f8caf82585932eab14cb99fcbc4d595b (diff) | |
download | nixlib-23fd70b71951b7b1446d7803e714bf55a291d694.tar nixlib-23fd70b71951b7b1446d7803e714bf55a291d694.tar.gz nixlib-23fd70b71951b7b1446d7803e714bf55a291d694.tar.bz2 nixlib-23fd70b71951b7b1446d7803e714bf55a291d694.tar.lz nixlib-23fd70b71951b7b1446d7803e714bf55a291d694.tar.xz nixlib-23fd70b71951b7b1446d7803e714bf55a291d694.tar.zst nixlib-23fd70b71951b7b1446d7803e714bf55a291d694.zip |
Merge pull request #15018 from ericsagnes/pkg-fix/php
php: add default php.ini
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/rename.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/web-servers/apache-httpd/default.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/web-servers/phpfpm.nix | 21 |
3 files changed, 18 insertions, 6 deletions
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 6b02446d53b4..5c4793624e02 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -123,6 +123,7 @@ with lib; (mkRemovedOptionModule [ "services" "printing" "cupsFilesConf" ]) (mkRemovedOptionModule [ "services" "printing" "cupsdConf" ]) (mkRemovedOptionModule [ "services" "xserver" "startGnuPGAgent" ]) + (mkRemovedOptionModule [ "services" "phpfpm" "phpIni" ]) ]; } diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 7953729c00cd..c23897192b4c 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -406,7 +406,7 @@ let ([ mainCfg.phpOptions ] ++ (map (svc: svc.phpOptions) allSubservices)); } '' - cat ${php}/etc/php-recommended.ini > $out + cat ${php}/etc/php.ini > $out echo "$options" >> $out ''; diff --git a/nixos/modules/services/web-servers/phpfpm.nix b/nixos/modules/services/web-servers/phpfpm.nix index 6a60000ce19e..2658d7117e37 100644 --- a/nixos/modules/services/web-servers/phpfpm.nix +++ b/nixos/modules/services/web-servers/phpfpm.nix @@ -19,6 +19,12 @@ let ${concatStringsSep "\n" (mapAttrsToList (n: v: "[${n}]\n${v}") cfg.poolConfigs)} ''; + phpIni = pkgs.writeText "php.ini" '' + ${readFile "${cfg.phpPackage}/etc/php.ini"} + + ${cfg.phpOptions} + ''; + in { options = { @@ -44,10 +50,15 @@ in { ''; }; - phpIni = mkOption { - type = types.path; - default = "${cfg.phpPackage}/etc/php-recommended.ini"; - description = "php.ini file to use."; + phpOptions = mkOption { + type = types.lines; + default = ""; + example = + '' + date.timezone = "CET" + ''; + description = + "Options appended to the PHP configuration file <filename>php.ini</filename>."; }; poolConfigs = mkOption { @@ -84,7 +95,7 @@ in { mkdir -p "${stateDir}" ''; serviceConfig = { - ExecStart = "${cfg.phpPackage}/sbin/php-fpm -y ${cfgFile} -c ${cfg.phpIni}"; + ExecStart = "${cfg.phpPackage}/bin/php-fpm -y ${cfgFile} -c ${phpIni}"; PIDFile = pidFile; }; }; |