diff --git a/nixos/modules/services/mail/postfix-tlspol.nix b/nixos/modules/services/mail/postfix-tlspol.nix index 16f04628c809..dd49700734df 100644 --- a/nixos/modules/services/mail/postfix-tlspol.nix +++ b/nixos/modules/services/mail/postfix-tlspol.nix @@ -19,6 +19,7 @@ let cfg = config.services.postfix-tlspol; format = pkgs.formats.yaml_1_2 { }; + configFile = format.generate "postfix-tlspol.yaml" cfg.settings; in { @@ -148,8 +149,7 @@ in }) (mkIf cfg.enable { - environment.etc."postfix-tlspol/config.yaml".source = - format.generate "postfix-tlspol.yaml" cfg.settings; + environment.etc."postfix-tlspol/config.yaml".source = configFile; environment.systemPackages = [ cfg.package ]; @@ -173,6 +173,8 @@ in description = "Postfix DANE/MTA-STS TLS policy socketmap service"; documentation = [ "https://github.com/Zuplu/postfix-tlspol" ]; + reloadTriggers = [ configFile ]; + # https://github.com/Zuplu/postfix-tlspol/blob/main/init/postfix-tlspol.service serviceConfig = { ExecStart = toString [