]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/phpfpm/default.nix
Move shaarli passwords to secure location
[perso/Immae/Config/Nix.git] / nixops / modules / websites / phpfpm / default.nix
index 882babcd8e9d61a94c9869c3600dee37db2278cb..9c068bf604080420f059ce07ba95960304d981cb 100644 (file)
@@ -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";