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:
parent
df0eb78b31
commit
7874cc6005
@ -19,6 +19,7 @@ let
|
|||||||
cfg = config.services.postfix-tlspol;
|
cfg = config.services.postfix-tlspol;
|
||||||
|
|
||||||
format = pkgs.formats.yaml_1_2 { };
|
format = pkgs.formats.yaml_1_2 { };
|
||||||
|
configFile = format.generate "postfix-tlspol.yaml" cfg.settings;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -148,8 +149,7 @@ in
|
|||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.enable {
|
(mkIf cfg.enable {
|
||||||
environment.etc."postfix-tlspol/config.yaml".source =
|
environment.etc."postfix-tlspol/config.yaml".source = configFile;
|
||||||
format.generate "postfix-tlspol.yaml" cfg.settings;
|
|
||||||
|
|
||||||
environment.systemPackages = [ cfg.package ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
@ -173,6 +173,8 @@ in
|
|||||||
description = "Postfix DANE/MTA-STS TLS policy socketmap service";
|
description = "Postfix DANE/MTA-STS TLS policy socketmap service";
|
||||||
documentation = [ "https://github.com/Zuplu/postfix-tlspol" ];
|
documentation = [ "https://github.com/Zuplu/postfix-tlspol" ];
|
||||||
|
|
||||||
|
reloadTriggers = [ configFile ];
|
||||||
|
|
||||||
# https://github.com/Zuplu/postfix-tlspol/blob/main/init/postfix-tlspol.service
|
# https://github.com/Zuplu/postfix-tlspol/blob/main/init/postfix-tlspol.service
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = toString [
|
ExecStart = toString [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user