Add DHCP pool support.

This commit is contained in:
Yaro Kasear 2026-05-01 13:33:44 -05:00
parent f35e402b4d
commit bf6ba269af
3 changed files with 141 additions and 39 deletions

View file

@ -0,0 +1,37 @@
let
lib = import <nixpkgs/lib>;
addressing = import ../lib/addressing {
inherit lib;
};
spec = {
locations = {
cloud = {
domain = "kasear.net";
networks.cloud.subnets.dmz.hosts.eris.role = "router";
};
norfolk = {
domain = "kasear.net";
networks.norfolk.subnets = {
main.hosts.loki.role = "adminWorkstation";
iot = {
dhcpRange = {
startIp = "10.1.125.10";
endIp = "10.1.127.200";
};
hosts.thermostat.role = "homeAutomation";
};
lab = {
dhcp = false;
hosts.testbox.role = "labDevice";
};
};
};
};
};
in
addressing.mkNetworkFromSpec spec