1
0
nixfiles/hosts/carbon/net-heimnetz.nix

67 lines
1.4 KiB
Nix

{ ... }:
{
## Heimnetz
networking.vlans."enp1s0.201" = {
id = 201;
interface = "enp1s0";
};
networking.bridges."net-heimnetz".interfaces = [
"enp1s0.201"
"enp2s0"
];
networking.interfaces."net-heimnetz".ipv6.addresses = [
{ address = "fe80::1"; prefixLength = 64; }
{ address = "fd00:152:152:4::1"; prefixLength = 64; }
{ address = "2001:4cd8:100:1337::1"; prefixLength = 64; } # public IPs for local network
];
networking.interfaces."net-heimnetz".ipv4.addresses = [
{ address = "10.152.4.1"; prefixLength = 24; }
];
services.radvd.config = ''
interface net-heimnetz {
AdvSendAdvert on;
prefix 2001:4cd8:100:1337::/64 {};
RDNSS fd00:152:152::1 {};
DNSSL net.clerie.de {};
};
'';
services.kea.dhcp4 = {
settings = {
interfaces-config = {
interfaces = [ "net-heimnetz" ];
};
subnet4 = [
# Heimnetz
{
id = 201;
subnet = "10.152.4.0/24";
pools = [
{
pool = "10.152.4.100 - 10.152.4.240";
}
];
option-data = [
{
name = "routers";
data = "10.152.4.1";
}
{
name = "domain-name-servers";
data = "10.152.0.1";
}
{
name = "domain-name";
data = "net.clerie.de";
}
];
}
];
};
};
}