362 lines
10 KiB
Nix
362 lines
10 KiB
Nix
{ ... }: {
|
|
services.kea.dhcp4 = {
|
|
enable = true;
|
|
settings = {
|
|
interfaces-config = {
|
|
interfaces = [
|
|
"lan"
|
|
"server"
|
|
"infrastructure"
|
|
"multimedia"
|
|
"smart"
|
|
"guest"
|
|
];
|
|
};
|
|
lease-database = {
|
|
name = "/var/lib/kea/dhcp4.leases";
|
|
persist = true;
|
|
type = "memfile";
|
|
};
|
|
rebind-timer = 2000;
|
|
renew-timer = 1000;
|
|
subnet4 = [
|
|
{
|
|
pools = [
|
|
{
|
|
pool = "10.42.96.100 - 10.42.96.240";
|
|
}
|
|
];
|
|
subnet = "10.42.96.0/24";
|
|
interface = "lan";
|
|
option-data = [
|
|
{
|
|
name = "routers";
|
|
data = "10.42.96.1";
|
|
}
|
|
{
|
|
name = "domain-name";
|
|
data = "cloonar.com";
|
|
}
|
|
{
|
|
name = "domain-search";
|
|
data = "cloonar.com";
|
|
}
|
|
{
|
|
name = "domain-name-servers";
|
|
data = "10.42.96.1";
|
|
}
|
|
];
|
|
reservations = [
|
|
];
|
|
}
|
|
{
|
|
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 = "1a:c4:04:6e:29:bd";
|
|
ip-address = "10.42.97.2";
|
|
server-hostname = "omada.cloonar.com";
|
|
}
|
|
{
|
|
hw-address = "02:00:00:00:00:03";
|
|
ip-address = "10.42.97.5";
|
|
server-hostname = "web-02.cloonar.com";
|
|
}
|
|
{
|
|
hw-address = "ea:db:d4:c1:18:ba";
|
|
ip-address = "10.42.97.50";
|
|
server-hostname = "git.cloonar.com";
|
|
}
|
|
{
|
|
hw-address = "c2:4f:64:dd:13:0c";
|
|
ip-address = "10.42.97.20";
|
|
server-hostname = "home-assistant.cloonar.com";
|
|
}
|
|
{
|
|
hw-address = "1a:c4:04:6e:29:02";
|
|
ip-address = "10.42.97.25";
|
|
server-hostname = "deconz.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";
|
|
}
|
|
{
|
|
name = "capwap-ac-v4";
|
|
code = 138;
|
|
data = "10.42.97.2";
|
|
}
|
|
];
|
|
reservations = [
|
|
];
|
|
}
|
|
{
|
|
pools = [
|
|
{
|
|
pool = "10.42.99.100 - 10.42.99.240";
|
|
}
|
|
];
|
|
subnet = "10.42.99.0/24";
|
|
interface = "multimedia";
|
|
option-data = [
|
|
{
|
|
name = "routers";
|
|
data = "10.42.99.1";
|
|
}
|
|
{
|
|
name = "domain-name";
|
|
data = "cloonar.multimedia";
|
|
}
|
|
{
|
|
name = "domain-name-servers";
|
|
data = "10.42.99.1";
|
|
}
|
|
];
|
|
reservations = [
|
|
{
|
|
hw-address = "c4:a7:2b:c7:ea:30";
|
|
ip-address = "10.42.99.10";
|
|
hostname = "metz.cloonar.multimedia";
|
|
}
|
|
{
|
|
hw-address = "f0:2f:9e:d4:3b:21";
|
|
ip-address = "10.42.99.11";
|
|
hostname = "firetv-living";
|
|
}
|
|
{
|
|
hw-address = "bc:33:29:ed:24:f0";
|
|
ip-address = "10.42.99.12";
|
|
hostname = "ps5";
|
|
}
|
|
{
|
|
hw-address = "e4:2a:ac:32:3f:79";
|
|
ip-address = "10.42.99.13";
|
|
hostname = "xbox";
|
|
}
|
|
{
|
|
hw-address = "98:b6:e9:b6:ef:f4";
|
|
ip-address = "10.42.99.14";
|
|
hostname = "switch";
|
|
}
|
|
{
|
|
hw-address = "f0:2f:9e:c1:74:72";
|
|
ip-address = "10.42.99.21";
|
|
hostname = "firetv-bedroom";
|
|
}
|
|
];
|
|
}
|
|
{
|
|
pools = [
|
|
{
|
|
pool = "10.42.254.10 - 10.42.254.254";
|
|
}
|
|
];
|
|
subnet = "10.42.254.0/24";
|
|
interface = "guest";
|
|
option-data = [
|
|
{
|
|
name = "routers";
|
|
data = "10.42.254.1";
|
|
}
|
|
{
|
|
name = "domain-name-servers";
|
|
data = "9.9.9.9";
|
|
}
|
|
];
|
|
}
|
|
{
|
|
pools = [
|
|
{
|
|
pool = "10.42.100.100 - 10.42.100.240";
|
|
}
|
|
];
|
|
subnet = "10.42.100.0/24";
|
|
interface = "smart";
|
|
option-data = [
|
|
{
|
|
name = "routers";
|
|
data = "10.42.100.1";
|
|
}
|
|
{
|
|
name = "domain-name";
|
|
data = "cloonar.smart";
|
|
}
|
|
{
|
|
name = "domain-name-servers";
|
|
data = "10.42.100.1";
|
|
}
|
|
];
|
|
reservations = [
|
|
# need fixed ips for all shelly devices
|
|
# living room 1 - 14
|
|
# 10.42.100.2 # bulb1
|
|
# 10.42.100.3 # bulb2
|
|
# 10.42.100.4 # bulb3
|
|
# 10.42.100.5 # bulb4
|
|
# 10.42.100.6 # bulb5
|
|
# 10.42.100.7 # bulb6
|
|
# 10.42.100.8 # piano
|
|
# 10.42.100.9 # switch
|
|
# 10.42.100.10 # steamdeck
|
|
# kitchen:
|
|
# 10.42.100.17 # coffee
|
|
# 10.42.100.18 # bar
|
|
# bedroom:
|
|
# 10.42.100.33 # switch
|
|
# 10.42.100.34 # button1
|
|
# 10.42.100.35 # button2
|
|
# 10.42.100.36 # readingled1
|
|
# 10.42.100.37 # readingled2
|
|
# 10.42.100.38 # bedled
|
|
# bath:
|
|
# 10.42.100.49 # switch
|
|
# 10.42.100.50 # bulb1
|
|
# 10.42.100.51 # bulb2
|
|
# 10.42.100.52 # smallswitch
|
|
# 10.42.100.53 # ht
|
|
# hallway:
|
|
# 10.42.100.65 # switch
|
|
# 10.42.100.66 # bulb1
|
|
# 10.42.100.67 # bulb2
|
|
# 10.42.100.68 # bulb3
|
|
# 10.42.100.69 # bulb4
|
|
# toilet:
|
|
# 10.42.100.81 # switch
|
|
# 10.42.100.82 # bulb
|
|
# storage:
|
|
# 10.42.100.97 # switch
|
|
|
|
{
|
|
hw-address = "60:a4:23:97:4a:ec";
|
|
ip-address = "10.42.100.21";
|
|
server-hostname = "shellymotionsensor-60A423974AEC";
|
|
}
|
|
{
|
|
hw-address = "8c:aa:b5:61:6f:e2";
|
|
ip-address = "10.42.100.103";
|
|
server-hostname = "ShellyBulbDuo-8CAAB5616FE2";
|
|
}
|
|
{
|
|
hw-address = "8c:aa:b5:61:6e:9e";
|
|
ip-address = "10.42.100.104";
|
|
server-hostname = "ShellyBulbDuo-8CAAB5616E9E";
|
|
}
|
|
{
|
|
hw-address = "cc:50:e3:bc:27:64";
|
|
ip-address = "10.42.100.112";
|
|
server-hostname = "Nuki_Bridge_1A753F72";
|
|
}
|
|
{
|
|
hw-address = "e8:db:84:a9:ea:be";
|
|
ip-address = "10.42.100.117";
|
|
server-hostname = "ShellyBulbDuo-E8DB84A9EABE";
|
|
}
|
|
{
|
|
hw-address = "e8:db:84:a9:d1:8b";
|
|
ip-address = "10.42.100.119";
|
|
server-hostname = "shellycolorbulb-E8DB84A9D18B";
|
|
}
|
|
{
|
|
hw-address = "3c:61:05:e5:96:e0";
|
|
ip-address = "10.42.100.120";
|
|
server-hostname = "shellycolorbulb-3C6105E596E0";
|
|
}
|
|
{
|
|
hw-address = "e8:db:84:a9:d7:ef";
|
|
ip-address = "10.42.100.121";
|
|
server-hostname = "shellycolorbulb-E8DB84A9D7EF";
|
|
}
|
|
{
|
|
hw-address = "e8:db:84:aa:51:aa";
|
|
ip-address = "10.42.100.122";
|
|
server-hostname = "shellycolorbulb-E8DB84AA51AA";
|
|
}
|
|
|
|
{
|
|
hw-address = "34:94:54:79:bc:57";
|
|
ip-address = "10.42.100.130";
|
|
server-hostname = "shellycolorbulb-34945479bc57";
|
|
}
|
|
{
|
|
hw-address = "48:55:19:d9:a1:b2";
|
|
ip-address = "10.42.100.131";
|
|
server-hostname = "shellycolorbulb-485519d9a1b2";
|
|
}
|
|
{
|
|
hw-address = "48:55:19:d9:ae:95";
|
|
ip-address = "10.42.100.132";
|
|
server-hostname = "shellycolorbulb-485519d9ae95";
|
|
}
|
|
{
|
|
hw-address = "48:55:19:d9:4a:28";
|
|
ip-address = "10.42.100.133";
|
|
server-hostname = "shellycolorbulb-485519d94a28";
|
|
}
|
|
{
|
|
hw-address = "48:55:19:da:6b:6a";
|
|
ip-address = "10.42.100.134";
|
|
server-hostname = "shellycolorbulb-485519da6b6a";
|
|
}
|
|
{
|
|
hw-address = "48:55:19:d9:e0:18";
|
|
ip-address = "10.42.100.135";
|
|
server-hostname = "shellycolorbulb-485519d9e018";
|
|
}
|
|
|
|
{
|
|
hw-address = "34:6f:24:f3:af:ad";
|
|
ip-address = "10.42.100.137";
|
|
server-hostname = "daikin86604";
|
|
}
|
|
{
|
|
hw-address = "34:6f:24:c1:f8:54";
|
|
ip-address = "10.42.100.139";
|
|
server-hostname = "daikin53800";
|
|
}
|
|
];
|
|
}
|
|
];
|
|
valid-lifetime = 4000;
|
|
};
|
|
};
|
|
}
|