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.
This commit is contained in:
Martin Weinelt 2025-06-28 23:44:37 +02:00
parent df0eb78b31
commit 7874cc6005
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -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 [