nixos/tinc: add "restartTriggers" back
Add "restartTriggers" back to restart the Tinc daemon when its peer is removed. Reverted #27660
This commit is contained in:
parent
d05b0b6b70
commit
ddd13e1375
1 changed files with 6 additions and 0 deletions
|
@ -163,6 +163,12 @@ in
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
path = [ data.package ];
|
||||
restartTriggers =
|
||||
let
|
||||
drvlist = [ config.environment.etc."tinc/${network}/tinc.conf".source ]
|
||||
++ mapAttrsToList (host: _: config.environment.etc."tinc/${network}/hosts/${host}".source) data.hosts;
|
||||
in # drvlist might be too long to be used directly
|
||||
[ (builtins.hashString "sha256" (concatMapStrings (d: d.outPath) drvlist)) ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
|
|
Loading…
Reference in a new issue