From 6eb9f538c5ca32136ca5f90cbba8508e3be6169f Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 13 Aug 2024 14:21:42 +0200 Subject: [PATCH] Adapt Wireguard configuration to upstream changes --- modules/networking.nix | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/modules/networking.nix b/modules/networking.nix index bebf198..db35c59 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -78,11 +78,9 @@ in { FirewallMark = 34952; }; wireguardPeers = [{ - wireguardPeerConfig = { - PublicKey = "GN8lqPBZYOulh6xD4GhkoEWI65HMMCpSxJSH5871YnU="; - AllowedIPs = [ "0.0.0.0/0" ]; - Endpoint = "coolneng.duckdns.org:1194"; - }; + PublicKey = "GN8lqPBZYOulh6xD4GhkoEWI65HMMCpSxJSH5871YnU="; + AllowedIPs = [ "0.0.0.0/0" ]; + Endpoint = "coolneng.duckdns.org:1194"; }]; }; systemd.network.networks."wg0" = { @@ -96,19 +94,15 @@ in { MulticastDNS = "yes"; }; routingPolicyRules = [{ - routingPolicyRuleConfig = { - FirewallMark = 34952; - InvertRule = true; - Table = 1000; - Priority = 10; - }; + FirewallMark = 34952; + InvertRule = true; + Table = 1000; + Priority = 10; }]; routes = [{ - routeConfig = { - Gateway = "10.8.0.1"; - GatewayOnLink = true; - Table = 1000; - }; + Gateway = "10.8.0.1"; + GatewayOnLink = true; + Table = 1000; }]; };