summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-03-06 10:51:05 +0100
committertv <tv@krebsco.de>2022-03-06 10:51:05 +0100
commitccc7796402ccdb9e2c10d6f7ebd46957d23b3cbb (patch)
tree380b90f79cfb38fef78e8226ab9fa6f5ac4e6d69
parent560371d038888dc028bdda51d55ff81cbf82eeb9 (diff)
Revert "tinc: use ip from path"
This reverts commit 332d4f5e1719df2b27f835c4fd0718317867043c.
-rw-r--r--krebs/3modules/tinc.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/krebs/3modules/tinc.nix b/krebs/3modules/tinc.nix
index 96d17e2de..8fb8961c6 100644
--- a/krebs/3modules/tinc.nix
+++ b/krebs/3modules/tinc.nix
@@ -27,7 +27,7 @@ with import <stockholm/lib>;
${tinc.config.extraConfig}
'';
"tinc-up" = pkgs.writeDash "${netname}-tinc-up" ''
- ip link set ${netname} up
+ ${tinc.config.iproutePackage}/sbin/ip link set ${netname} up
${tinc.config.tincUp}
'';
});
@@ -59,14 +59,15 @@ with import <stockholm/lib>;
type = types.str;
default = let
net = tinc.config.host.nets.${netname};
+ iproute = tinc.config.iproutePackage;
in ''
${optionalString (net.ip4 != null) /* sh */ ''
- ip -4 addr add ${net.ip4.addr} dev ${netname}
- ip -4 route add ${net.ip4.prefix} dev ${netname}
+ ${iproute}/sbin/ip -4 addr add ${net.ip4.addr} dev ${netname}
+ ${iproute}/sbin/ip -4 route add ${net.ip4.prefix} dev ${netname}
''}
${optionalString (net.ip6 != null) /* sh */ ''
- ip -6 addr add ${net.ip6.addr} dev ${netname}
- ip -6 route add ${net.ip6.prefix} dev ${netname}
+ ${iproute}/sbin/ip -6 addr add ${net.ip6.addr} dev ${netname}
+ ${iproute}/sbin/ip -6 route add ${net.ip6.prefix} dev ${netname}
''}
${tinc.config.tincUpExtra}
'';