1
0

router, pre-router: move DHCP server

This commit is contained in:
clerie 2022-07-17 15:34:17 +02:00
parent bbf2c50235
commit 56db344be8
3 changed files with 25 additions and 43 deletions

View File

@ -5,7 +5,6 @@
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./router.nix ./router.nix
./dhcp.nix
./dns.nix ./dns.nix
./ipv6.nix ./ipv6.nix
./nginx.nix ./nginx.nix

View File

@ -1,42 +0,0 @@
{ config, pkgs, ...}:
{
services.kea.dhcp4 = {
enable = true;
settings = {
interfaces-config = {
interfaces = [ "ens19"];
};
lease-database = {
name = "/var/lib/kea/dhcp4.leases";
persist = true;
type = "memfile";
};
subnet4 = [
# Heimnetz
{
subnet = "10.42.10.1/24";
pools = [
{
pool = "10.42.10.50 - 10.42.10.240";
}
];
option-data = [
{
name = "routers";
data = "10.42.10.1";
}
{
name = "domain-name-servers";
data = "10.42.10.8";
}
{
name = "domain-name";
data = "bula22.de";
}
];
}
];
};
};
}

View File

@ -27,6 +27,31 @@
}; };
''; '';
services.kea.dhcp4 = {
settings = {
interfaces-config = {
interfaces = [ "net-services" ];
};
subnet4 = [
{
id = 10;
subnet = "10.42.10.1/24";
pools = [
{
pool = "10.42.10.100 - 10.42.10.240";
}
];
option-data = [
{
name = "routers";
data = "10.42.10.1";
}
];
}
];
};
};
# Everyone is allowed reaching this, no firewall therefore # Everyone is allowed reaching this, no firewall therefore
clerie.uplink-selector.interfaces.net-services.uplink = "uplink-a"; clerie.uplink-selector.interfaces.net-services.uplink = "uplink-a";