From c923294b84cdd22bc171337335735cd564f9a03c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 14 Jan 2022 04:14:32 +0100 Subject: Revert "vidhar: ..." This reverts commit ac71bc3f6216a247615ce36c6eddf25365b00a76. --- hosts/vidhar/network/default.nix | 94 ++++++++-------------------------------- 1 file changed, 18 insertions(+), 76 deletions(-) (limited to 'hosts/vidhar/network/default.nix') diff --git a/hosts/vidhar/network/default.nix b/hosts/vidhar/network/default.nix index 29d4ba92..a1d1b172 100644 --- a/hosts/vidhar/network/default.nix +++ b/hosts/vidhar/network/default.nix @@ -21,7 +21,7 @@ { address = "10.141.1.1"; prefixLength = 24; } ]; }; - interfaces."wifibh" = { + interfaces."dmz01" = { ipv4.addresses = [ { address = "10.141.2.1"; prefixLength = 24; } ]; @@ -32,11 +32,11 @@ id = 2; interface = "eno2"; }; - "eno2.lan" = { + lan = { id = 3; interface = "eno2"; }; - wifibh = { + dmz01 = { id = 4; interface = "eno2"; }; @@ -70,6 +70,13 @@ option domain-name-servers 10.141.1.1; option broadcast-address 10.141.1.255; } + + subnet 10.141.2.0 netmask 255.255.255.0 { + range 10.141.2.128 10.141.2.254; + option domain-name-servers 10.141.2.1; + option broadcast-address 10.141.2.255; + option routers 10.141.2.1; + } ''; machines = [ { @@ -89,81 +96,16 @@ } ]; }; - systemd.network = { - netdevs = { - "wifibh01" = { - netdevConfig = { - Name = "wifibh01"; - Kind = "gretap"; - }; - tunnelConfig = { - Local = "10.141.2.1"; - Remote = "10.141.2.2"; - }; - }; - "wifibh01.lan" = { - netdevConfig = { - Name = "wifibh01.lan"; - Kind = "vlan"; - }; - vlanConfig = { - Id = 2; - }; - }; - lan = { - netdevConfig = { - Name = "lan"; - Kind = "bridge"; - }; + systemd.network.networks = { + "eno1" = { + matchConfig.Name = "eno1"; + linkConfig = { + ActivationPolicy = "down"; }; }; - - networks = { - "eno1" = { - matchConfig.Name = "eno1"; - linkConfig = { - ActivationPolicy = "down"; - }; - }; - "eno2" = { - matchConfig.Name = "eno2"; - networkConfig.LinkLocalAddressing = "no"; - }; - "40-wifibh" = { - matchConfig.Name = "wifibh"; - networkConfig = { - Tunnel = ["wifibh01"]; - }; - }; - "wifibh01" = { - matchConfig.Name = "wifibh01"; - linkConfig = { - MACAddress = "02:01:00:00:00:00"; - RequiredForOnline = false; - }; - networkConfig = { - LinkLocalAddressing = "no"; - VLAN = ["wifibh01.lan"]; - }; - }; - "wifibh01.lan" = { - matchConfig.Name = "wifibh01.lan"; - networkConfig.Bridge = "lan"; - extraConfig = '' - [Bridge] - HairPin = true - Cost = 10 - ''; - }; - "40-eno2.lan" = { - matchConfig.Name = "eno2.lan"; - networkConfig.Bridge = "lan"; - extraConfig = '' - [Bridge] - HairPin = false - Cost = 1 - ''; - }; + "eno2" = { + matchConfig.Name = "eno2"; + networkConfig.LinkLocalAddressing = "no"; }; }; }; -- cgit v1.2.3