From 3804ee85b07ad2904ee8ae27a4ca8c477ddd30e6 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 9 Oct 2021 10:58:21 +0200 Subject: yggdrasil-wg: ... --- modules/yggdrasil-wg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/yggdrasil-wg') diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index 9c58c9fe..37ff5f99 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix @@ -75,8 +75,8 @@ in { peers = map linkToPeer hostLinks; privateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path; postSetup = '' - ${concatMapStringsSep "\n" (linkArgs: let other = if linkArgs.from == hostName then linkArgs.to else linkArgs.from; in concatMapStringsSep "\n" (otherIP: "ip route replate \"${otherIP}\" dev \"yggdrasil\" table \"main\"") hostIPs.${other}) hostLinks} - ${concatMapStringsSep "\n" (routeArgs: let other = if routeArgs.from == hostName then routeArgs.to else routeArgs.from; in concatMapStringsSep "\n" (otherIP: concatMapStringsSep "\n" (viaIP: "ip route replate \"${otherIP}\" via \"${viaIP}\" dev \"yggdrasil\" table \"main\"") hostIPs.${routeArgs.via}) hostIPs.${other}) hostRoutes} + ${concatMapStringsSep "\n" (linkArgs: let other = if linkArgs.from == hostName then linkArgs.to else linkArgs.from; in concatMapStringsSep "\n" (otherIP: "ip route replace \"${otherIP}\" dev \"yggdrasil\" table \"main\"") hostIPs.${other}) hostLinks} + ${concatMapStringsSep "\n" (routeArgs: let other = if routeArgs.from == hostName then routeArgs.to else routeArgs.from; in concatMapStringsSep "\n" (otherIP: concatMapStringsSep "\n" (viaIP: "ip route replace \"${otherIP}\" via \"${viaIP}\" dev \"yggdrasil\" table \"main\"") hostIPs.${routeArgs.via}) hostIPs.${other}) hostRoutes} ''; }; }; -- cgit v1.2.3