233 lines
6.5 KiB
Nix
233 lines
6.5 KiB
Nix
{ ... }: {
|
|
services.kea.dhcp4 = {
|
|
enable = true;
|
|
settings = {
|
|
interfaces-config = {
|
|
interfaces = [
|
|
"lan"
|
|
"server"
|
|
"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 = "domain-name";
|
|
value = "cloonar.com";
|
|
}
|
|
];
|
|
reservations = [
|
|
{
|
|
hw-address = "98:b6:e9:b6:ef:f4";
|
|
ip-address = "10.42.96.21";
|
|
server-hostname = "switch.cloonar.com";
|
|
}
|
|
{
|
|
hw-address = "c4:a7:2b:c7:ea:30";
|
|
ip-address = "10.42.96.167";
|
|
server-hostname = "metz.cloonar.com";
|
|
}
|
|
{
|
|
hw-address = "bc:33:29:ed:24:f0";
|
|
ip-address = "10.42.96.176";
|
|
server-hostname = "ps5-living.cloonar.com";
|
|
}
|
|
];
|
|
}
|
|
{
|
|
pools = [
|
|
{
|
|
pool = "10.42.97.100 - 10.42.97.240";
|
|
}
|
|
];
|
|
subnet = "10.42.97.0/24";
|
|
interface = "server";
|
|
option-data = [
|
|
{
|
|
name = "domain-name";
|
|
value = "cloonar.com";
|
|
}
|
|
];
|
|
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.99.100 - 10.42.99.240";
|
|
}
|
|
];
|
|
subnet = "10.42.99.0/24";
|
|
interface = "multimedia";
|
|
option-data = [
|
|
{
|
|
name = "domain-name";
|
|
value = "cloonar.multimedia";
|
|
}
|
|
];
|
|
}
|
|
{
|
|
pools = [
|
|
{
|
|
pool = "10.42.100.100 - 10.42.100.240";
|
|
}
|
|
];
|
|
subnet = "10.42.100.0/24";
|
|
interface = "guest";
|
|
}
|
|
{
|
|
pools = [
|
|
{
|
|
pool = "10.42.254.100 - 10.42.254.240";
|
|
}
|
|
];
|
|
subnet = "10.42.254.0/24";
|
|
interface = "smart";
|
|
option-data = [
|
|
{
|
|
name = "domain-name";
|
|
value = "cloonar.smart";
|
|
}
|
|
];
|
|
reservations = [
|
|
{
|
|
hw-address = "7a:5a:d6:d0:29:fe";
|
|
ip-address = "10.42.254.10";
|
|
server-hostname = "home-assistant.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "60:a4:23:97:4a:ec";
|
|
ip-address = "10.42.254.21";
|
|
server-hostname = "shellymotionsensor-60A423974AEC.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "8c:aa:b5:61:6f:e2";
|
|
ip-address = "10.42.254.103";
|
|
server-hostname = "ShellyBulbDuo-8CAAB5616FE2.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "8c:aa:b5:61:6e:9e";
|
|
ip-address = "10.42.254.104";
|
|
server-hostname = "ShellyBulbDuo-8CAAB5616E9E.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "cc:50:e3:bc:27:64";
|
|
ip-address = "10.42.254.112";
|
|
server-hostname = "Nuki_Bridge_1A753F72.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "e8:db:84:aa:19:6d";
|
|
ip-address = "10.42.254.116";
|
|
server-hostname = "shellybutton1-E8DB84AA196D.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "e8:db:84:a9:ea:be";
|
|
ip-address = "10.42.254.117";
|
|
server-hostname = "ShellyBulbDuo-E8DB84A9EABE.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "e8:db:84:a9:d1:8b";
|
|
ip-address = "10.42.254.119";
|
|
server-hostname = "shellycolorbulb-E8DB84A9D18B.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "3c:61:05:e5:96:e0";
|
|
ip-address = "10.42.254.120";
|
|
server-hostname = "shellycolorbulb-3C6105E596E0.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "e8:db:84:a9:d7:ef";
|
|
ip-address = "10.42.254.121";
|
|
server-hostname = "shellycolorbulb-E8DB84A9D7EF.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "e8:db:84:aa:51:aa";
|
|
ip-address = "10.42.254.122";
|
|
server-hostname = "shellycolorbulb-E8DB84AA51AA.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "34:6f:24:f3:af:ad";
|
|
ip-address = "10.42.254.137";
|
|
server-hostname = "daikin86604.cloonar.smart";
|
|
}
|
|
{
|
|
hw-address = "34:6f:24:c1:f8:54";
|
|
ip-address = "10.42.254.139";
|
|
server-hostname = "daikin53800.cloonar.smart";
|
|
}
|
|
];
|
|
}
|
|
];
|
|
dhcp-ddns = {
|
|
ip-address = "127.0.0.1";
|
|
port = 53001;
|
|
enable-updates = true;
|
|
forward-ddns = {
|
|
ddns-domains = [
|
|
{
|
|
name = "cloonar.com.";
|
|
key-name = "dhcp1-ns1";
|
|
dns-servers = [
|
|
{ ip-address = "127.0.0.1"; }
|
|
];
|
|
}
|
|
{
|
|
name = "cloonar.smart.";
|
|
key-name = "dhcp1-ns1";
|
|
dns-servers = [
|
|
{ ip-address = "127.0.0.1"; }
|
|
];
|
|
}
|
|
{
|
|
name = "cloonar.multimedia.";
|
|
key-name = "dhcp1-ns1";
|
|
dns-servers = [
|
|
{ ip-address = "127.0.0.1"; }
|
|
];
|
|
}
|
|
];
|
|
};
|
|
reverse-ddns = {
|
|
ddns-domains = [
|
|
{
|
|
name = "42.10.in-addr.arpa.";
|
|
key-name = "dhcp1-ns1";
|
|
dns-servers = [
|
|
{ ip-address = "127.0.0.1"; }
|
|
];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
valid-lifetime = 4000;
|
|
};
|
|
};
|
|
}
|