61 lines
1.3 KiB
Nix
61 lines
1.3 KiB
Nix
|
{ config, pkgs, ...}:
|
||
|
|
||
|
{
|
||
|
networking.vlans."net-trabantenst" = {
|
||
|
id = 216;
|
||
|
interface = "ens18";
|
||
|
};
|
||
|
|
||
|
networking.interfaces.net-trabantenst.ipv6.addresses = [
|
||
|
{ address = "fe80::1"; prefixLength = 64; }
|
||
|
{ address = "fd00:10:42:216::1"; prefixLength = 64; }
|
||
|
];
|
||
|
networking.interfaces.net-trabantenst.ipv4.addresses = [
|
||
|
{ address = "10.42.216.1"; prefixLength = 24; }
|
||
|
];
|
||
|
|
||
|
services.radvd.config = ''
|
||
|
interface net-trabantenst {
|
||
|
AdvSendAdvert on;
|
||
|
MaxRtrAdvInterval 30;
|
||
|
prefix ::/64 {
|
||
|
AdvValidLifetime 60;
|
||
|
AdvPreferredLifetime 30;
|
||
|
};
|
||
|
RDNSS 2a01:4f8:1c0c:8221::8 {};
|
||
|
DNSSL bula22.de {};
|
||
|
};
|
||
|
'';
|
||
|
|
||
|
services.kea.dhcp4 = {
|
||
|
settings = {
|
||
|
interfaces-config = {
|
||
|
interfaces = [ "net-trabantenst" ];
|
||
|
};
|
||
|
subnet4 = [
|
||
|
{
|
||
|
id = 216;
|
||
|
subnet = "10.42.216.1/24";
|
||
|
pools = [
|
||
|
{
|
||
|
pool = "10.42.216.100 - 10.42.216.240";
|
||
|
}
|
||
|
];
|
||
|
option-data = [
|
||
|
{
|
||
|
name = "routers";
|
||
|
data = "10.42.216.1";
|
||
|
}
|
||
|
];
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
clerie.forward-filter.interfaces.net-trabantenst.rules = [
|
||
|
{ incomingInterface = "net-ikt"; }
|
||
|
];
|
||
|
|
||
|
clerie.uplink-selector.interfaces.net-trabantenst.uplink = "uplink-b";
|
||
|
}
|