2022-07-12 20:33:17 +02:00
|
|
|
{ config, pkgs, ...}:
|
|
|
|
|
|
|
|
{
|
2022-07-13 22:05:55 +02:00
|
|
|
networking.vlans."net-services" = {
|
|
|
|
id = 10;
|
|
|
|
interface = "ens18";
|
|
|
|
};
|
2022-07-12 20:33:17 +02:00
|
|
|
|
2022-07-13 22:05:55 +02:00
|
|
|
networking.interfaces.net-services.ipv4.addresses = [
|
2022-07-17 15:22:28 +02:00
|
|
|
{ address = "10.42.10.1"; prefixLength = 24; }
|
2022-07-13 22:05:55 +02:00
|
|
|
{ address = "10.42.10.2"; prefixLength = 24; }
|
|
|
|
];
|
|
|
|
networking.interfaces.net-services.ipv6.addresses = [
|
2022-07-17 15:10:55 +02:00
|
|
|
{ address = "fe80::1"; prefixLength = 64; }
|
|
|
|
{ address = "fd00:10:42:10::1"; prefixLength = 64; }
|
|
|
|
{ address = "fd00:10:42:10::2"; prefixLength = 64; }
|
2022-07-17 15:22:28 +02:00
|
|
|
{ address = "2a01:4f8:1c0c:8221::1"; prefixLength = 64; }
|
2022-07-13 22:05:55 +02:00
|
|
|
{ address = "2a01:4f8:1c0c:8221::2"; prefixLength = 64; }
|
|
|
|
];
|
2022-07-21 09:53:52 +02:00
|
|
|
networking.interfaces.net-services.ipv4.routes = [
|
|
|
|
{ address = "10.42.132.0"; prefixLength = 23; via = "10.42.10.6"; }
|
|
|
|
];
|
2022-07-13 22:05:55 +02:00
|
|
|
|
2022-07-17 15:10:55 +02:00
|
|
|
services.radvd.config = ''
|
|
|
|
interface net-services {
|
|
|
|
AdvSendAdvert on;
|
|
|
|
prefix ::/64 {};
|
|
|
|
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
|
|
|
DNSSL bula22.de {};
|
|
|
|
};
|
|
|
|
'';
|
|
|
|
|
2022-07-17 15:34:17 +02:00
|
|
|
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";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-07-13 22:05:55 +02:00
|
|
|
# Everyone is allowed reaching this, no firewall therefore
|
2022-07-15 01:16:51 +02:00
|
|
|
|
|
|
|
clerie.uplink-selector.interfaces.net-services.uplink = "uplink-a";
|
2022-07-12 20:33:17 +02:00
|
|
|
}
|