diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-13 23:16:21 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-13 23:16:21 +0100 |
commit | ac71bc3f6216a247615ce36c6eddf25365b00a76 (patch) | |
tree | d2820c91c95fc896bf7be3537cb96af9f95109ba /hosts/vidhar/network/default.nix | |
parent | 40b58a6084d00592dfa9c76ace349b9d7d5e04fa (diff) | |
download | nixos-ac71bc3f6216a247615ce36c6eddf25365b00a76.tar nixos-ac71bc3f6216a247615ce36c6eddf25365b00a76.tar.gz nixos-ac71bc3f6216a247615ce36c6eddf25365b00a76.tar.bz2 nixos-ac71bc3f6216a247615ce36c6eddf25365b00a76.tar.xz nixos-ac71bc3f6216a247615ce36c6eddf25365b00a76.zip |
vidhar: ...
Diffstat (limited to 'hosts/vidhar/network/default.nix')
-rw-r--r-- | hosts/vidhar/network/default.nix | 67 |
1 files changed, 53 insertions, 14 deletions
diff --git a/hosts/vidhar/network/default.nix b/hosts/vidhar/network/default.nix index 81dac652..e3d7dd14 100644 --- a/hosts/vidhar/network/default.nix +++ b/hosts/vidhar/network/default.nix | |||
@@ -21,7 +21,7 @@ | |||
21 | { address = "10.141.1.1"; prefixLength = 24; } | 21 | { address = "10.141.1.1"; prefixLength = 24; } |
22 | ]; | 22 | ]; |
23 | }; | 23 | }; |
24 | interfaces."dmz01" = { | 24 | interfaces."wifibh" = { |
25 | ipv4.addresses = [ | 25 | ipv4.addresses = [ |
26 | { address = "10.141.2.1"; prefixLength = 24; } | 26 | { address = "10.141.2.1"; prefixLength = 24; } |
27 | ]; | 27 | ]; |
@@ -32,11 +32,11 @@ | |||
32 | id = 2; | 32 | id = 2; |
33 | interface = "eno2"; | 33 | interface = "eno2"; |
34 | }; | 34 | }; |
35 | lan = { | 35 | "eno2.lan" = { |
36 | id = 3; | 36 | id = 3; |
37 | interface = "eno2"; | 37 | interface = "eno2"; |
38 | }; | 38 | }; |
39 | dmz01 = { | 39 | wifibh = { |
40 | id = 4; | 40 | id = 4; |
41 | interface = "eno2"; | 41 | interface = "eno2"; |
42 | }; | 42 | }; |
@@ -70,13 +70,6 @@ | |||
70 | option domain-name-servers 10.141.1.1; | 70 | option domain-name-servers 10.141.1.1; |
71 | option broadcast-address 10.141.1.255; | 71 | option broadcast-address 10.141.1.255; |
72 | } | 72 | } |
73 | |||
74 | subnet 10.141.2.0 netmask 255.255.255.0 { | ||
75 | range 10.141.2.128 10.141.2.254; | ||
76 | option domain-name-servers 10.141.2.1; | ||
77 | option broadcast-address 10.141.2.255; | ||
78 | option routers 10.141.2.1; | ||
79 | } | ||
80 | ''; | 73 | ''; |
81 | machines = [ | 74 | machines = [ |
82 | { | 75 | { |
@@ -96,10 +89,56 @@ | |||
96 | } | 89 | } |
97 | ]; | 90 | ]; |
98 | }; | 91 | }; |
99 | systemd.network.networks = { | 92 | systemd.network = { |
100 | "eno2" = { | 93 | netdevs = { |
101 | matchConfig.Name = "eno2"; | 94 | "wifibh01" = { |
102 | networkConfig.LinkLocalAddressing = "no"; | 95 | netdevConfig = { |
96 | Name = "wifibh01"; | ||
97 | Kind = "gretap"; | ||
98 | }; | ||
99 | tunnelConfig = { | ||
100 | Local = "10.141.2.1"; | ||
101 | Remote = "10.141.2.2"; | ||
102 | }; | ||
103 | }; | ||
104 | "wifibh01.lan" = { | ||
105 | netdevConfig = { | ||
106 | Name = "wifibh01.lan"; | ||
107 | Kind = "vlan"; | ||
108 | }; | ||
109 | vlanConfig = { | ||
110 | VLAN = "2"; | ||
111 | }; | ||
112 | }; | ||
113 | lan = { | ||
114 | netdevConfig = { | ||
115 | Name = "lan"; | ||
116 | Kind = "bridge"; | ||
117 | }; | ||
118 | }; | ||
119 | }; | ||
120 | |||
121 | networks = { | ||
122 | "eno2" = { | ||
123 | matchConfig.Name = "eno2"; | ||
124 | networkConfig.LinkLocalAddressing = "no"; | ||
125 | }; | ||
126 | "wifibh01.lan" = { | ||
127 | matchConfig.Name = "wifibh01.lan"; | ||
128 | networkConfig.Bridge = "lan"; | ||
129 | bridgeConfig = { | ||
130 | HairPin = true; | ||
131 | Cost = "10"; | ||
132 | }; | ||
133 | }; | ||
134 | "40-eno2.lan" = { | ||
135 | matchConfig.Name = "eno2.lan"; | ||
136 | networkConfig.Bridge = "lan"; | ||
137 | bridgeConfig = { | ||
138 | HairPin = false; | ||
139 | Cost = "1"; | ||
140 | }; | ||
141 | }; | ||
103 | }; | 142 | }; |
104 | }; | 143 | }; |
105 | }; | 144 | }; |