nixos/tinc: minor fixes
This commit is contained in:
parent
d878456441
commit
3ae018592d
@ -163,12 +163,7 @@ in
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
path = [ data.package ];
|
path = [ data.package ];
|
||||||
restartTriggers =
|
restartTriggers = [ config.environment.etc."tinc/${network}/tinc.conf".source ];
|
||||||
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 = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
@ -207,7 +202,8 @@ in
|
|||||||
${concatStringsSep "\n" (mapAttrsToList (network: data:
|
${concatStringsSep "\n" (mapAttrsToList (network: data:
|
||||||
optionalString (versionAtLeast data.package.version "1.1pre") ''
|
optionalString (versionAtLeast data.package.version "1.1pre") ''
|
||||||
makeWrapper ${data.package}/bin/tinc "$out/bin/tinc.${network}" \
|
makeWrapper ${data.package}/bin/tinc "$out/bin/tinc.${network}" \
|
||||||
--add-flags "--pidfile=/run/tinc.${network}.pid"
|
--add-flags "--pidfile=/run/tinc.${network}.pid" \
|
||||||
|
--add-flags "--config=/etc/tinc/${network}"
|
||||||
'') cfg.networks)}
|
'') cfg.networks)}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user