From bda1a6b603a3944223707a6d090622b574ea7505 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 29 Jul 2022 11:07:19 +0200 Subject: bump & vpn --- modules/yggdrasil-wg/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'modules/yggdrasil-wg') diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index 55fb1e9d..1e52ba06 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix @@ -202,7 +202,7 @@ in { Name = "yggdrasil"; }; address = batHostIPs.${hostName}; - dns = ["[2a03:4000:52:ada:1:1::]"]; + dns = ["2a03:4000:52:ada:1:1::"]; domains = ["yggdrasil"]; routes = [ { routeConfig = { @@ -222,7 +222,7 @@ in { Table = "yggdrasil"; }; } - ] ++ (concatMap (router: map (rAddr: { routeConfig = { Destination = "::/0"; Gateway = stripSubnet rAddr; GatewayOnLink = true; Table = "yggdrasil"; }; }) batHostIPs.${router}) routers); + ] ++ (concatMap (router: map (rAddr: { routeConfig = { Destination = "::/0"; Gateway = stripSubnet rAddr; GatewayOnLink = true; Table = "yggdrasil"; }; }) batHostIPs.${router}) (filter (router: router != hostName) routers)); routingPolicyRules = map (addr: { routingPolicyRuleConfig = { Table = "yggdrasil"; From = stripSubnet addr; Priority = 1; }; }) batHostIPs.${hostName}; linkConfig = { MACAddress = "${batHostMACs.${hostName}}"; @@ -236,13 +236,8 @@ in { }; }; } // listToAttrs (map familyToYggdrasilNetwork hostFamilies) // listToAttrs (concatMap (family: imap0 (linkToGreNetwork family) hostLinks.${family}) hostFamilies); - }; - environment.etc."systemd/networkd.conf" = mkIf inNetwork { - text = '' - [Network] - RouteTable=yggdrasil:1024 - ''; + config.routeTables.yggdrasil = 1024; }; sops.secrets = listToAttrs (map familyToSopsSecret hostFamilies); -- cgit v1.2.3