about summary refs log tree commit diff
path: root/nixos/modules/services/mail
diff options
context:
space:
mode:
authorJonas Heinrich <onny@project-insanity.org>2023-05-27 15:49:05 +0200
committerNick Cao <nickcao@nichi.co>2023-05-30 12:41:07 +0800
commit63f73b3295d165a6d60cc3322ec46b2c37f646d0 (patch)
tree545dee47fb58aa0ee3a24c77b414589239fb9c9f /nixos/modules/services/mail
parent288b2fa580edf3e7a4814422717b6055a5cf65ea (diff)
downloadnixlib-63f73b3295d165a6d60cc3322ec46b2c37f646d0.tar
nixlib-63f73b3295d165a6d60cc3322ec46b2c37f646d0.tar.gz
nixlib-63f73b3295d165a6d60cc3322ec46b2c37f646d0.tar.bz2
nixlib-63f73b3295d165a6d60cc3322ec46b2c37f646d0.tar.lz
nixlib-63f73b3295d165a6d60cc3322ec46b2c37f646d0.tar.xz
nixlib-63f73b3295d165a6d60cc3322ec46b2c37f646d0.tar.zst
nixlib-63f73b3295d165a6d60cc3322ec46b2c37f646d0.zip
nixos/maddy: change secrets option to accept a list of paths
Diffstat (limited to 'nixos/modules/services/mail')
-rw-r--r--nixos/modules/services/mail/maddy.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/services/mail/maddy.nix b/nixos/modules/services/mail/maddy.nix
index 701d57f18e0c..3b4a517fb859 100644
--- a/nixos/modules/services/mail/maddy.nix
+++ b/nixos/modules/services/mail/maddy.nix
@@ -335,12 +335,13 @@ in {
       };
 
       secrets = lib.mkOption {
-        type = lib.types.path;
+        type = with types; listOf path;
         description = lib.mdDoc ''
-          A file containing the various secrets. Should be in the format
+          A list of files containing the various secrets. Should be in the format
           expected by systemd's `EnvironmentFile` directory. Secrets can be
           referenced in the format `{env:VAR}`.
         '';
+        default = [ ];
       };
 
     };
@@ -379,7 +380,7 @@ in {
             User = cfg.user;
             Group = cfg.group;
             StateDirectory = [ "maddy" ];
-            EnvironmentFile = lib.mkIf (cfg.secrets != null) "${cfg.secrets}";
+            EnvironmentFile = cfg.secrets;
           };
           restartTriggers = [ config.environment.etc."maddy/maddy.conf".source ];
           wantedBy = [ "multi-user.target" ];