diff --git a/module.nix b/module.nix index 1ae4fb4..1e6efe1 100644 --- a/module.nix +++ b/module.nix @@ -84,7 +84,6 @@ in serviceConfig = { Type = "simple"; ExecStart = lib.getExe pkgs.mail-quota-warning; - EnvironmentFile = [ cfg.secrets ]; # hardening AmbientCapabilities = ""; @@ -115,7 +114,9 @@ in SystemCallArchitectures = "native"; SystemCallFilter = [ "@system-service" "~@privileged" ]; UMask = "0077"; - }; + } // lib.optionalAttrs (cfg.secretFile != [ ]) { + EnvironmentFile = cfg.secretFile; + }; }; systemd.timers.mail-quota-warning = {