Add support for restartUnits and reloadUnits for templates

This fixes https://github.com/Mic92/sops-nix/issues/634
This commit is contained in:
Jeremy Fleischman 2024-11-07 15:26:43 -06:00 committed by mergify[bot]
parent c9f6b151cc
commit 60e1bce199
3 changed files with 64 additions and 19 deletions

View file

@ -65,6 +65,24 @@ in {
File used as the template. When this value is specified, `sops.templates.<name>.content` is ignored.
'';
};
restartUnits = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ "sshd.service" ];
description = ''
Names of units that should be restarted when the rendered template changes.
This works the same way as <xref linkend="opt-systemd.services._name_.restartTriggers" />.
'';
};
reloadUnits = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ "sshd.service" ];
description = ''
Names of units that should be reloaded when the rendered template changes.
This works the same way as <xref linkend="opt-systemd.services._name_.reloadTriggers" />.
'';
};
};
}));
default = { };