summaryrefslogtreecommitdiff
path: root/hosts/vidhar/network/bifrost/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2024-08-08 10:45:09 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2024-08-08 10:45:09 +0200
commit63adb41f1a060c21a68143eb9e86c2790ef66f36 (patch)
tree3902b85e7659fd396ded1d2e42ea318153d08a13 /hosts/vidhar/network/bifrost/default.nix
parent73b08cbd76d4471c9a6fddd05265d7d7fc4c45ff (diff)
downloadnixos-63adb41f1a060c21a68143eb9e86c2790ef66f36.tar
nixos-63adb41f1a060c21a68143eb9e86c2790ef66f36.tar.gz
nixos-63adb41f1a060c21a68143eb9e86c2790ef66f36.tar.bz2
nixos-63adb41f1a060c21a68143eb9e86c2790ef66f36.tar.xz
nixos-63adb41f1a060c21a68143eb9e86c2790ef66f36.zip
...
Diffstat (limited to 'hosts/vidhar/network/bifrost/default.nix')
-rw-r--r--hosts/vidhar/network/bifrost/default.nix46
1 files changed, 17 insertions, 29 deletions
diff --git a/hosts/vidhar/network/bifrost/default.nix b/hosts/vidhar/network/bifrost/default.nix
index ec354f81..59550481 100644
--- a/hosts/vidhar/network/bifrost/default.nix
+++ b/hosts/vidhar/network/bifrost/default.nix
@@ -18,12 +18,10 @@ in {
18 ListenPort = 51822; 18 ListenPort = 51822;
19 }; 19 };
20 wireguardPeers = [ 20 wireguardPeers = [
21 { wireguardPeerConfig = { 21 { AllowedIPs = [ "::/0" ];
22 AllowedIPs = [ "::/0" ]; 22 PublicKey = trim (readFile ../../../surtr/bifrost/surtr.pub);
23 PublicKey = trim (readFile ../../../surtr/bifrost/surtr.pub); 23 PersistentKeepalive = 5;
24 PersistentKeepalive = 5; 24 Endpoint = "2a03:4000:52:ada:::51822";
25 Endpoint = "2a03:4000:52:ada:::51822";
26 };
27 } 25 }
28 ]; 26 ];
29 }; 27 };
@@ -36,35 +34,25 @@ in {
36 }; 34 };
37 address = ["2a03:4000:52:ada:4:1::/96"]; 35 address = ["2a03:4000:52:ada:4:1::/96"];
38 routes = [ 36 routes = [
39 { routeConfig = { 37 { Destination = "2a03:4000:52:ada:4::/80";
40 Destination = "2a03:4000:52:ada:4::/80";
41 };
42 } 38 }
43 { routeConfig = { 39 { Gateway = "2a03:4000:52:ada:4::";
44 Gateway = "2a03:4000:52:ada:4::"; 40 GatewayOnLink = true;
45 GatewayOnLink = true; 41 Table = "bifrost";
46 Table = "bifrost";
47 };
48 } 42 }
49 { routeConfig = { 43 { Destination = "2a03:4000:52:ada:4::/80";
50 Destination = "2a03:4000:52:ada:4::/80"; 44 GatewayOnLink = true;
51 GatewayOnLink = true; 45 Table = "bifrost";
52 Table = "bifrost";
53 };
54 } 46 }
55 { routeConfig = { 47 { Destination = "2a03:4000:52:ada:4:1::/96";
56 Destination = "2a03:4000:52:ada:4:1::/96"; 48 GatewayOnLink = true;
57 GatewayOnLink = true; 49 Table = "bifrost";
58 Table = "bifrost";
59 };
60 } 50 }
61 ]; 51 ];
62 routingPolicyRules = [ 52 routingPolicyRules = [
63 { routingPolicyRuleConfig = { 53 { Table = "bifrost";
64 Table = "bifrost"; 54 From = "2a03:4000:52:ada:4:1::/96";
65 From = "2a03:4000:52:ada:4:1::/96"; 55 Priority = 1;
66 Priority = 1;
67 };
68 } 56 }
69 ]; 57 ];
70 linkConfig = { 58 linkConfig = {