diff options
Diffstat (limited to 'hosts/vidhar/network')
-rw-r--r-- | hosts/vidhar/network/bifrost/default.nix | 46 | ||||
-rw-r--r-- | hosts/vidhar/network/default.nix | 31 | ||||
-rw-r--r-- | hosts/vidhar/network/dhcp/default.nix | 9 |
3 files changed, 38 insertions, 48 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 = { |
diff --git a/hosts/vidhar/network/default.nix b/hosts/vidhar/network/default.nix index cbfbb65a..0643f0bb 100644 --- a/hosts/vidhar/network/default.nix +++ b/hosts/vidhar/network/default.nix | |||
@@ -89,22 +89,21 @@ with lib; | |||
89 | }; | 89 | }; |
90 | }; | 90 | }; |
91 | 91 | ||
92 | services.nfs.server = { | 92 | services.nfs = { |
93 | enable = true; | 93 | server = { |
94 | createMountPoints = true; | 94 | enable = true; |
95 | 95 | createMountPoints = true; | |
96 | statdPort = 4000; | 96 | |
97 | lockdPort = 4001; | 97 | statdPort = 4000; |
98 | mountdPort = 4002; | 98 | lockdPort = 4001; |
99 | 99 | mountdPort = 4002; | |
100 | extraNfsdConfig = '' | 100 | |
101 | vers3=off | 101 | exports = '' |
102 | ''; | 102 | /srv/nfs 10.141.0.0/24(ro,async,root_squash,fsid=0) 2a03:4000:52:ada:1::/80(ro,async,root_squash,fsid=0) |
103 | 103 | /srv/nfs/nix-store 10.141.0.0/24(ro,async,root_squash) 2a03:4000:52:ada:1::/80(ro,async,root_squash) | |
104 | exports = '' | 104 | ''; |
105 | /srv/nfs 10.141.0.0/24(ro,async,root_squash,fsid=0) 2a03:4000:52:ada:1::/80(ro,async,root_squash,fsid=0) | 105 | }; |
106 | /srv/nfs/nix-store 10.141.0.0/24(ro,async,root_squash) 2a03:4000:52:ada:1::/80(ro,async,root_squash) | 106 | settings.nfsd.vers3 = false; |
107 | ''; | ||
108 | }; | 107 | }; |
109 | 108 | ||
110 | fileSystems = { | 109 | fileSystems = { |
diff --git a/hosts/vidhar/network/dhcp/default.nix b/hosts/vidhar/network/dhcp/default.nix index 4d8a54ae..07a83351 100644 --- a/hosts/vidhar/network/dhcp/default.nix +++ b/hosts/vidhar/network/dhcp/default.nix | |||
@@ -70,7 +70,8 @@ with lib; | |||
70 | ddns-update-on-renew = true; | 70 | ddns-update-on-renew = true; |
71 | 71 | ||
72 | subnet4 = [ | 72 | subnet4 = [ |
73 | { subnet = "10.141.0.0/24"; | 73 | { id = 3; |
74 | subnet = "10.141.0.0/24"; | ||
74 | option-data = [ | 75 | option-data = [ |
75 | { name = "domain-name-servers"; | 76 | { name = "domain-name-servers"; |
76 | data = "10.141.0.1"; | 77 | data = "10.141.0.1"; |
@@ -110,7 +111,8 @@ with lib; | |||
110 | } | 111 | } |
111 | ]; | 112 | ]; |
112 | } | 113 | } |
113 | { subnet = "10.141.1.0/24"; | 114 | { id = 2; |
115 | subnet = "10.141.1.0/24"; | ||
114 | option-data = [ | 116 | option-data = [ |
115 | { name = "domain-name-servers"; | 117 | { name = "domain-name-servers"; |
116 | data = "10.141.1.1"; | 118 | data = "10.141.1.1"; |
@@ -142,7 +144,8 @@ with lib; | |||
142 | } | 144 | } |
143 | ]; | 145 | ]; |
144 | } | 146 | } |
145 | { subnet = "10.141.2.0/24"; | 147 | { id = 4; |
148 | subnet = "10.141.2.0/24"; | ||
146 | option-data = [ | 149 | option-data = [ |
147 | { name = "domain-name-servers"; | 150 | { name = "domain-name-servers"; |
148 | data = "10.141.2.1"; | 151 | data = "10.141.2.1"; |