secret file optional

This commit is contained in:
Jonas Heinrich 2025-08-18 15:35:13 +02:00
parent e924bf1db6
commit 62676eaaa3

View file

@ -84,7 +84,6 @@ in
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";
ExecStart = lib.getExe pkgs.mail-quota-warning; ExecStart = lib.getExe pkgs.mail-quota-warning;
EnvironmentFile = [ cfg.secrets ];
# hardening # hardening
AmbientCapabilities = ""; AmbientCapabilities = "";
@ -115,6 +114,8 @@ in
SystemCallArchitectures = "native"; SystemCallArchitectures = "native";
SystemCallFilter = [ "@system-service" "~@privileged" ]; SystemCallFilter = [ "@system-service" "~@privileged" ];
UMask = "0077"; UMask = "0077";
} // lib.optionalAttrs (cfg.secretFile != [ ]) {
EnvironmentFile = cfg.secretFile;
}; };
}; };