From 07cc1920136ce61980c80c6bde3c267fcbc6218f Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sat, 28 Mar 2026 18:46:16 -0500 Subject: begin poweredge config --- hosts/poweredge/networking.nix | 78 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 hosts/poweredge/networking.nix (limited to 'hosts/poweredge/networking.nix') diff --git a/hosts/poweredge/networking.nix b/hosts/poweredge/networking.nix new file mode 100644 index 0000000..31f3b40 --- /dev/null +++ b/hosts/poweredge/networking.nix @@ -0,0 +1,78 @@ +{ + networking = { + # Label lan and wan interfaces + _interfaceLabels = { + enable = true; + interfaces = { + lan0 = "00:a0:98:7a:ac:0b"; + wan0 = "00:a0:98:ff:ff:ff"; + }; + }; + # Set ip addresses + interfaces = { + lan0.ipv4.addresses = [{ + address = "192.168.1.1"; + prefixLength = 24; + }]; + wan0.useDHCP = true; + }; + defaultGateway.interface = "wan0"; + nameservers = [ "127.0.0.1" ]; + # Firewall rules + firewall = { + interfaces.wan0 = { + allowedUDPPorts = [ 51820 ]; + }; + }; + #nat.forwardPorts = [ + # { + # sourcePort = 2222; + # proto = "tcp"; + # destination = "10.1.1.1:22"; + # } + # { + # sourcePort = 22; + # proto = "tcp"; + # destination = "10.1.1.1:22"; + # } + #]; + }; + + services._router = { + dnsDhcpConfig = { + localDomain = "wg-router.pls.lan"; + dhcp = { + defaultGateway = ipAddress; + localhostIp = ipAddress; + rangeStart = "192.168.1.50"; + rangeEnd = "192.168.1.250"; + staticLeases = { + idrac-7N94GK2 = { + macAddress = "50:9a:4c:5d:c3:7c"; + staticIp = "192.168.1.3"; + }; + OpenWrt-Attic = { + macAddress = "34:98:b5:60:5e:be"; + staticIp = "192.168.1.4"; + }; + OpenWrt-Basement = { + macAddress = "8c:3b:ad:35:c7:8c"; + staticIp = "192.168.1.5"; + }; + ArcherC54 = { + macAddress = "12:eb:b6:13:f9:e2"; + staticIp = "192.168.1.6"; + }; + T495 = { + macAddress = "04:33:c2:9d:34:74"; + staticIp = "192.168.1.11"; + }; + Optiplex = { + macAddress = "e4:54:e8:bc:ba:05"; + staticIp = "192.168.1.12"; + }; + }; + }; + }; + }; +} -- cgit v1.2.3