Merge pull request #29881 from volth/patch-67

nixos/tinc: add "restartTriggers" back
This commit is contained in:
Jörg Thalheim 2017-09-28 00:57:26 +01:00 committed by GitHub
commit 0a6fca15fd

View File

@ -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";