diff --git a/nixos/modules/services/security/vaultwarden/default.nix b/nixos/modules/services/security/vaultwarden/default.nix index e15f8a2eeeb1..5bcd5eee6324 100644 --- a/nixos/modules/services/security/vaultwarden/default.nix +++ b/nixos/modules/services/security/vaultwarden/default.nix @@ -172,11 +172,11 @@ in }; environmentFile = lib.mkOption { - type = with lib.types; nullOr path; - default = null; + type = with lib.types; coercedTo path lib.singleton (listOf path); + default = [ ]; example = "/var/lib/vaultwarden.env"; description = '' - Additional environment file as defined in {manpage}`systemd.exec(5)`. + Additional environment file or files as defined in {manpage}`systemd.exec(5)`. Secrets like {env}`ADMIN_TOKEN` and {env}`SMTP_PASSWORD` should be passed to the service without adding them to the world-readable Nix store. @@ -225,7 +225,7 @@ in serviceConfig = { User = user; Group = group; - EnvironmentFile = [ configFile ] ++ lib.optional (cfg.environmentFile != null) cfg.environmentFile; + EnvironmentFile = [ configFile ] ++ cfg.environmentFile; ExecStart = lib.getExe vaultwarden; LimitNOFILE = "1048576"; CapabilityBoundingSet = [ "" ];