diff options
Diffstat (limited to 'hosts/vidhar/network/bifrost')
-rw-r--r-- | hosts/vidhar/network/bifrost/default.nix | 46 |
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 = { |