From 7874cc600524a2a529eda71f203dbc1a64496eea Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 28 Jun 2025 23:44:37 +0200 Subject: [PATCH] nixos/postfix-tlspol: fix config reload Since we only pass a symlink to ExecStart we need to pass the backing file as a reload trigger. --- nixos/modules/services/mail/postfix-tlspol.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 [