From 09ff9915ad69c575cad56ebf29be632d78088cb3 Mon Sep 17 00:00:00 2001 From: Tim van Herpen Date: Wed, 17 Jun 2026 10:21:15 +0200 Subject: [PATCH] nixos/maddy: allow string paths for secrets to support optional EnvironmentFiles --- nixos/modules/services/mail/maddy.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/mail/maddy.nix b/nixos/modules/services/mail/maddy.nix index 0bd3a0c2bd99..cf17a862a32c 100644 --- a/nixos/modules/services/mail/maddy.nix +++ b/nixos/modules/services/mail/maddy.nix @@ -350,11 +350,13 @@ in }; secrets = lib.mkOption { - type = with lib.types; listOf path; + type = with lib.types; listOf (either str path); description = '' 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}`. + + Paths can be prefixed with `-` to ignore errors if the file does not exist. ''; default = [ ]; };