summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-10-09 10:58:21 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2021-10-09 10:58:21 +0200
commit3804ee85b07ad2904ee8ae27a4ca8c477ddd30e6 (patch)
tree307bb19a83a2ed4e2e46c2d741160ecdda7ae783
parente8ea72d0393c90a13921407ed7998efdf4263b76 (diff)
downloadnixos-3804ee85b07ad2904ee8ae27a4ca8c477ddd30e6.tar
nixos-3804ee85b07ad2904ee8ae27a4ca8c477ddd30e6.tar.gz
nixos-3804ee85b07ad2904ee8ae27a4ca8c477ddd30e6.tar.bz2
nixos-3804ee85b07ad2904ee8ae27a4ca8c477ddd30e6.tar.xz
nixos-3804ee85b07ad2904ee8ae27a4ca8c477ddd30e6.zip
yggdrasil-wg: ...
-rw-r--r--modules/yggdrasil-wg/default.nix4
1 files changed, 2 insertions, 2 deletions
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 {
75 peers = map linkToPeer hostLinks; 75 peers = map linkToPeer hostLinks;
76 privateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path; 76 privateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path;
77 postSetup = '' 77 postSetup = ''
78 ${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} 78 ${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}
79 ${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} 79 ${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}
80 ''; 80 '';
81 }; 81 };
82 }; 82 };