From fe9de450fd50e67e751809efa9231e2def2d4c97 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 17 Oct 2021 21:43:37 +0200 Subject: yggdrasil-wg: ... --- modules/yggdrasil-wg/default.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index 04e9b02e..37adc562 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix @@ -72,7 +72,7 @@ let netdevConfig = { Name = "yggre-${other}"; Kind = "ip6gretap"; - MTUBytes = toString 1280; + MTUBytes = toString (1280 + 32); }; tunnelConfig = { Local = stripSubnet wgHostIPs.${hostName}; @@ -123,7 +123,7 @@ in { netdevConfig = { Name = "yggdrasil-wg"; Kind = "wireguard"; - MTUBytes = toString (1280 + 70); + MTUBytes = toString (1280 + 32 + 70); }; wireguardConfig = { PrivateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path; @@ -135,6 +135,7 @@ in { netdevConfig = { Name = "yggdrasil"; Kind = "batadv"; + MTUBytes = 1280: }; }; } // listToAttrs (map linkToGreDev hostLinks); @@ -146,6 +147,12 @@ in { Name = "yggdrasil-wg"; }; address = [wgHostIPs.${hostName}]; + routes = [ + { routeConfig = { + Destination = "${wgSubnet}/${toString wgSubnetLength}"; + }; + } + ]; linkConfig = { RequiredForOnline = false; }; @@ -159,6 +166,12 @@ in { Name = "yggdrasil"; }; address = batHostIPs.${hostName}; + routes = [ + { routeConfig = { + Destination = "${batSubnet}/${toString batSubnetLength}"; + }; + } + ]; linkConfig = { RequiredForOnline = false; }; -- cgit v1.2.3