From 63adb41f1a060c21a68143eb9e86c2790ef66f36 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 8 Aug 2024 10:45:09 +0200 Subject: ... --- hosts/surtr/vpn/default.nix | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'hosts/surtr/vpn') diff --git a/hosts/surtr/vpn/default.nix b/hosts/surtr/vpn/default.nix index 74a9fb22..61a9d544 100644 --- a/hosts/surtr/vpn/default.nix +++ b/hosts/surtr/vpn/default.nix @@ -63,10 +63,8 @@ in { ListenPort = 51820; }; wireguardPeers = imap1 (i: { name, ip ? i }: { - wireguardPeerConfig = { - AllowedIPs = ["${prefix6}:${toString ip}::/96" "${prefix4}.${toString ip}/32"]; - PublicKey = trim (readFile (./. + "/${name}.pub")); - }; + AllowedIPs = ["${prefix6}:${toString ip}::/96" "${prefix4}.${toString ip}/32"]; + PublicKey = trim (readFile (./. + "/${name}.pub")); }) [ { name = "geri"; } { name = "sif"; } ]; }; }; @@ -86,19 +84,13 @@ in { MulticastDNS = false; }; routes = [ - { routeConfig = { - Destination = "202.61.240.1"; - }; + { Destination = "202.61.240.1"; } - { routeConfig = { - Destination = "0.0.0.0/0"; - Gateway = "202.61.240.1"; - }; + { Destination = "0.0.0.0/0"; + Gateway = "202.61.240.1"; } - { routeConfig = { - Destination = "::/0"; - Gateway = "fe80::1"; - }; + { Destination = "::/0"; + Gateway = "fe80::1"; } ]; extraConfig = '' @@ -114,13 +106,9 @@ in { }; address = ["${prefix6}::/96" "${prefix4}.0/32"]; routes = [ - { routeConfig = { - Destination = "${prefix6}::/80"; - }; + { Destination = "${prefix6}::/80"; } - { routeConfig = { - Destination = "${prefix4}.0/24"; - }; + { Destination = "${prefix4}.0/24"; } ]; linkConfig = { -- cgit v1.2.3