diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-06-16 21:05:44 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-06-16 21:05:44 +0200 |
| commit | a39e417c587ac1fce8c9095b0f64c43d790f087f (patch) | |
| tree | 6c2a3b472ba7a41cc2347e9e4ebc8043bfd48515 | |
| parent | 19010788ab5729346247f4a5ab4425c117f10350 (diff) | |
| download | nixos-a39e417c587ac1fce8c9095b0f64c43d790f087f.tar nixos-a39e417c587ac1fce8c9095b0f64c43d790f087f.tar.gz nixos-a39e417c587ac1fce8c9095b0f64c43d790f087f.tar.bz2 nixos-a39e417c587ac1fce8c9095b0f64c43d790f087f.tar.xz nixos-a39e417c587ac1fce8c9095b0f64c43d790f087f.zip | |
switch across all wired interfaces
| -rw-r--r-- | bragi.nix | 13 |
1 files changed, 10 insertions, 3 deletions
| @@ -159,20 +159,27 @@ | |||
| 159 | ''; | 159 | ''; |
| 160 | 160 | ||
| 161 | networking.interfaces = { | 161 | networking.interfaces = { |
| 162 | "enp1s0" = { | 162 | "wired" = { |
| 163 | useDHCP = false; | 163 | useDHCP = false; |
| 164 | ipAddress = "10.141.4.1"; | 164 | ipAddress = "10.141.4.1"; |
| 165 | prefixLength = 24; | 165 | prefixLength = 24; |
| 166 | }; | 166 | }; |
| 167 | }; | 167 | }; |
| 168 | 168 | ||
| 169 | networking.bridges."wired" = { | ||
| 170 | interfaces = [ "enp1s0" | ||
| 171 | "enp2s0" | ||
| 172 | "enp3s0" | ||
| 173 | ]; | ||
| 174 | }; | ||
| 175 | |||
| 169 | networking.nat = { | 176 | networking.nat = { |
| 170 | enable = true; | 177 | enable = true; |
| 171 | externalIP = "10.141.1.5"; | 178 | externalIP = "10.141.1.5"; |
| 172 | externalInterface = "wlp4s0"; | 179 | externalInterface = "wlp4s0"; |
| 173 | internalIPs = [ "10.141.4.0/24" | 180 | internalIPs = [ "10.141.4.0/24" |
| 174 | ]; | 181 | ]; |
| 175 | internalInterfaces = [ "enp1s0" | 182 | internalInterfaces = [ "wired" |
| 176 | ]; | 183 | ]; |
| 177 | }; | 184 | }; |
| 178 | 185 | ||
| @@ -187,7 +194,7 @@ | |||
| 187 | 194 | ||
| 188 | services.dhcpd = { | 195 | services.dhcpd = { |
| 189 | enable = true; | 196 | enable = true; |
| 190 | interfaces = "enp1s0"; | 197 | interfaces = "wired"; |
| 191 | extraConfig = '' | 198 | extraConfig = '' |
| 192 | option subnet-mask 255.255.255.0; | 199 | option subnet-mask 255.255.255.0; |
| 193 | option broadcast-address 10.141.1.1; | 200 | option broadcast-address 10.141.1.1; |
