From 8fafe65aec2dad03161f499fd0f3871d2f263809 Mon Sep 17 00:00:00 2001 From: sora Date: Mon, 11 Dec 2023 17:56:03 +0100 Subject: [PATCH] Update modules/nixos/system/network/wireguard/default.nix Corrected MTU --- .../system/network/wireguard/default.nix | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/modules/nixos/system/network/wireguard/default.nix b/modules/nixos/system/network/wireguard/default.nix index 4061c25..0fe9bef 100644 --- a/modules/nixos/system/network/wireguard/default.nix +++ b/modules/nixos/system/network/wireguard/default.nix @@ -1,18 +1,19 @@ -{ config, ... }: { - networking.wireguard = { - enable = true; - interfaces = { - wg0 = { - ips = [ config.hostcfg.net.wg.ip4 config.hostcfg.net.wg.ip6 ]; - privateKeyFile = config.hostcfg.net.wg.pk; - listenPort = 1515; - peers = [{ - allowedIPs = [ "10.10.1.0/24" "fd10:10:10::0/64" ]; - endpoint = "vpn.helcel.net:1515"; - publicKey = "NFBJvYXZC+bd62jhrKnM7/pugidWhgR6+C5qIiUiq3Q="; - persistentKeepalive = 30; - }]; - }; - }; - }; -} +{ config, ... }: { + networking.wireguard = { + enable = true; + interfaces = { + wg0 = { + ips = [ config.hostcfg.net.wg.ip4 config.hostcfg.net.wg.ip6 ]; + privateKeyFile = config.hostcfg.net.wg.pk; + listenPort = 1515; + mtu = 1340; + peers = [{ + allowedIPs = [ "10.10.1.0/24" "fd10:10:10::0/64" ]; + endpoint = "vpn.helcel.net:1515"; + publicKey = "NFBJvYXZC+bd62jhrKnM7/pugidWhgR6+C5qIiUiq3Q="; + persistentKeepalive = 30; + }]; + }; + }; + }; +}