X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2Fmodules%2Fwebsites%2Fphpfpm%2Fdefault.nix;h=9c068bf604080420f059ce07ba95960304d981cb;hb=5f08b34c5247ee0c4de2a9264d059b69271e3473;hp=882babcd8e9d61a94c9869c3600dee37db2278cb;hpb=a840a21c954be6342603ae7a45dde6c005761696;p=perso%2FImmae%2FConfig%2FNix.git 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 { ''; }; + envFile = mkOption { + default = {}; + type = types.attrsOf types.string; + example = literalExample '' + { mypool = "path/to/file"; + } + ''; + description = '' + Extra environment file go into the service script. + ''; + }; + poolPhpConfigs = mkOption { default = {}; type = types.attrsOf types.lines; @@ -174,6 +186,7 @@ in { cfgFile = fpmCfgFile pool poolConfig; poolPhpIni = cfg.poolPhpConfigs.${pool} or ""; in { + EnvironmentFile = if builtins.hasAttr pool cfg.envFile then [cfg.envFile.${pool}] else []; Slice = "phpfpm.slice"; PrivateDevices = true; ProtectSystem = "full";