From 50a8b8b1ac0a373690979a443d5920e98c8029b4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 10 Oct 2021 14:21:22 +0200 Subject: yggdrasil-wg: mtu --- modules/yggdrasil-wg/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index 67bb34f5..8e2ba7a4 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix @@ -77,6 +77,7 @@ in { peers = filter (value: value != null) (imap0 (ix: opts@{to, from, ...}: if from == hostName || to == hostName then linkToPeer ix opts else null) links); privateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path; postSetup = '' + ip li set mtu 1280 dev yggdrasil ${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\"") (map stripSubnet hostIPs.${routeArgs.via})) hostIPs.${other}) hostRoutes} ''; -- cgit v1.2.3