aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/websites/phpfpm
diff options
context:
space:
mode:
Diffstat (limited to 'nixops/modules/websites/phpfpm')
-rw-r--r--nixops/modules/websites/phpfpm/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixops/modules/websites/phpfpm/default.nix b/nixops/modules/websites/phpfpm/default.nix
index 882babc..9c068bf 100644
--- a/nixops/modules/websites/phpfpm/default.nix
+++ b/nixops/modules/websites/phpfpm/default.nix
@@ -83,6 +83,18 @@ in {
83 ''; 83 '';
84 }; 84 };
85 85
86 envFile = mkOption {
87 default = {};
88 type = types.attrsOf types.string;
89 example = literalExample ''
90 { mypool = "path/to/file";
91 }
92 '';
93 description = ''
94 Extra environment file go into the service script.
95 '';
96 };
97
86 poolPhpConfigs = mkOption { 98 poolPhpConfigs = mkOption {
87 default = {}; 99 default = {};
88 type = types.attrsOf types.lines; 100 type = types.attrsOf types.lines;
@@ -174,6 +186,7 @@ in {
174 cfgFile = fpmCfgFile pool poolConfig; 186 cfgFile = fpmCfgFile pool poolConfig;
175 poolPhpIni = cfg.poolPhpConfigs.${pool} or ""; 187 poolPhpIni = cfg.poolPhpConfigs.${pool} or "";
176 in { 188 in {
189 EnvironmentFile = if builtins.hasAttr pool cfg.envFile then [cfg.envFile.${pool}] else [];
177 Slice = "phpfpm.slice"; 190 Slice = "phpfpm.slice";
178 PrivateDevices = true; 191 PrivateDevices = true;
179 ProtectSystem = "full"; 192 ProtectSystem = "full";