diff --git a/hosts/fw.cloonar.com/modules/dhcp4.nix b/hosts/fw.cloonar.com/modules/dhcp4.nix index 34bffd2..c25b468 100644 --- a/hosts/fw.cloonar.com/modules/dhcp4.nix +++ b/hosts/fw.cloonar.com/modules/dhcp4.nix @@ -59,41 +59,41 @@ } ]; } - # { - # pools = [ - # { - # pool = "10.42.97.100 - 10.42.97.240"; - # } - # ]; - # subnet = "10.42.97.0/24"; - # interface = "server"; - # option-data = [ - # { - # name = "routers"; - # data = "10.42.97.1"; - # } - # { - # name = "domain-name"; - # data = "cloonar.com"; - # } - # { - # name = "domain-name-servers"; - # data = "10.42.97.1"; - # } - # ]; - # reservations = [ - # { - # hw-address = "0a:0e:52:a2:f7:8e"; - # ip-address = "10.42.97.20"; - # server-hostname = "home-assistant.cloonar.com"; - # } - # { - # hw-address = "36:2a:c9:26:d7:77"; - # ip-address = "10.42.97.118"; - # server-hostname = "git.cloonar.com"; - # } - # ]; - # } + { + pools = [ + { + pool = "10.42.101.100 - 10.42.101.240"; + } + ]; + subnet = "10.42.101.0/24"; + interface = "infrastructure"; + option-data = [ + { + name = "routers"; + data = "10.42.101.1"; + } + { + name = "domain-name"; + data = "cloonar.com"; + } + { + name = "domain-name-servers"; + data = "10.42.101.1"; + } + ]; + reservations = [ + { + hw-address = "0a:0e:52:a2:f7:8e"; + ip-address = "10.42.101.20"; + server-hostname = "home-assistant.cloonar.com"; + } + { + hw-address = "36:2a:c9:26:d7:77"; + ip-address = "10.42.101.118"; + server-hostname = "git.cloonar.com"; + } + ]; + } { pools = [ { @@ -120,30 +120,30 @@ { pools = [ { - pool = "10.42.100.100 - 10.42.100.240"; + pool = "10.42.254.10 - 10.42.254.254"; } ]; - subnet = "10.42.100.0/24"; + subnet = "10.42.254.0/24"; interface = "guest"; option-data = [ { name = "routers"; - data = "10.42.100.1"; + data = "10.42.254.1"; } ]; } { pools = [ { - pool = "10.42.254.100 - 10.42.254.240"; + pool = "10.42.100.100 - 10.42.100.240"; } ]; - subnet = "10.42.254.0/24"; + subnet = "10.42.100.0/24"; interface = "smart"; option-data = [ { name = "routers"; - data = "10.42.254.1"; + data = "10.42.100.1"; } { name = "domain-name"; @@ -151,73 +151,73 @@ } { name = "domain-name-servers"; - data = "10.42.254.1"; + data = "10.42.100.1"; } ]; reservations = [ { hw-address = "7a:5a:d6:d0:29:fe"; - ip-address = "10.42.254.10"; + ip-address = "10.42.100.10"; server-hostname = "home-assistant.cloonar.smart"; } { hw-address = "60:a4:23:97:4a:ec"; - ip-address = "10.42.254.21"; + ip-address = "10.42.100.21"; server-hostname = "shellymotionsensor-60A423974AEC.cloonar.smart"; } { hw-address = "8c:aa:b5:61:6f:e2"; - ip-address = "10.42.254.103"; + ip-address = "10.42.100.103"; server-hostname = "ShellyBulbDuo-8CAAB5616FE2.cloonar.smart"; } { hw-address = "8c:aa:b5:61:6e:9e"; - ip-address = "10.42.254.104"; + ip-address = "10.42.100.104"; server-hostname = "ShellyBulbDuo-8CAAB5616E9E.cloonar.smart"; } { hw-address = "cc:50:e3:bc:27:64"; - ip-address = "10.42.254.112"; + ip-address = "10.42.100.112"; server-hostname = "Nuki_Bridge_1A753F72.cloonar.smart"; } { hw-address = "e8:db:84:aa:19:6d"; - ip-address = "10.42.254.116"; + ip-address = "10.42.100.116"; server-hostname = "shellybutton1-E8DB84AA196D.cloonar.smart"; } { hw-address = "e8:db:84:a9:ea:be"; - ip-address = "10.42.254.117"; + ip-address = "10.42.100.117"; server-hostname = "ShellyBulbDuo-E8DB84A9EABE.cloonar.smart"; } { hw-address = "e8:db:84:a9:d1:8b"; - ip-address = "10.42.254.119"; + ip-address = "10.42.100.119"; server-hostname = "shellycolorbulb-E8DB84A9D18B.cloonar.smart"; } { hw-address = "3c:61:05:e5:96:e0"; - ip-address = "10.42.254.120"; + ip-address = "10.42.100.120"; server-hostname = "shellycolorbulb-3C6105E596E0.cloonar.smart"; } { hw-address = "e8:db:84:a9:d7:ef"; - ip-address = "10.42.254.121"; + ip-address = "10.42.100.121"; server-hostname = "shellycolorbulb-E8DB84A9D7EF.cloonar.smart"; } { hw-address = "e8:db:84:aa:51:aa"; - ip-address = "10.42.254.122"; + ip-address = "10.42.100.122"; server-hostname = "shellycolorbulb-E8DB84AA51AA.cloonar.smart"; } { hw-address = "34:6f:24:f3:af:ad"; - ip-address = "10.42.254.137"; + ip-address = "10.42.100.137"; server-hostname = "daikin86604.cloonar.smart"; } { hw-address = "34:6f:24:c1:f8:54"; - ip-address = "10.42.254.139"; + ip-address = "10.42.100.139"; server-hostname = "daikin53800.cloonar.smart"; } ]; diff --git a/hosts/fw.cloonar.com/modules/networking.nix b/hosts/fw.cloonar.com/modules/networking.nix index 6555b5e..a5fe58d 100644 --- a/hosts/fw.cloonar.com/modules/networking.nix +++ b/hosts/fw.cloonar.com/modules/networking.nix @@ -17,10 +17,6 @@ matchConfig.PermanentMACAddress = "a8:b8:e0:00:43:c2"; linkConfig.Name = "lan"; }; - "30-multimedia" = { - matchConfig.PermanentMACAddress = "a8:b8:e0:00:43:c3"; - linkConfig.Name = "multimedia"; - }; }; }; @@ -30,16 +26,20 @@ nameservers = [ "9.9.9.9" "149.112.112.112" ]; # Define VLANS vlans = { - # multimedia = { - # id = 3; - # interface = "enp5s0"; - # }; + infrastructure = { + id = 101; + interface = "enp5s0"; + }; + multimedia = { + id = 99; + interface = "enp5s0"; + }; smart = { - id = 4094; + id = 100; interface = "enp5s0"; }; guest = { - id = 100; + id = 254; interface = "enp5s0"; }; }; @@ -47,7 +47,7 @@ interfaces = { # Don't request DHCP on the physical interfaces lan.useDHCP = false; - server.useDHCP = false; + enp4s0.useDHCP = false; enp5s0.useDHCP = false; # Handle the VLANs @@ -64,6 +64,12 @@ # prefixLength = 24; # }]; # }; + infrastructure = { + ipv4.addresses = [{ + address = "10.42.101.1"; + prefixLength = 24; + }]; + }; multimedia = { ipv4.addresses = [{ address = "10.42.99.1"; diff --git a/hosts/fw.cloonar.com/modules/unbound.nix b/hosts/fw.cloonar.com/modules/unbound.nix index 8ac1a39..9d68f63 100644 --- a/hosts/fw.cloonar.com/modules/unbound.nix +++ b/hosts/fw.cloonar.com/modules/unbound.nix @@ -10,6 +10,7 @@ "10.42.97.0/24 allow" "10.42.98.0/24 allow" "10.42.99.0/24 allow" + "10.42.101.0/24 allow" "10.42.254.0/24 allow" ]; tls-cert-bundle = "/var/lib/acme/fw.cloonar.com/fullchain.pem";