1
0

hosts/carbon: Move net-heimnetz to seperate file

This commit is contained in:
clerie 2024-07-14 00:31:13 +02:00
parent 4105528835
commit f7b3336e41
Signed by: clerie
GPG Key ID: BD9F56480870BAD2
2 changed files with 68 additions and 48 deletions

View File

@ -7,6 +7,7 @@
../../configuration/router
./dns.nix
./net-heimnetz.nix
./ppp.nix
];
@ -47,23 +48,6 @@
id = 102;
interface = "enp1s0";
};
## 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; }
];
## Gastnetz
networking.vlans."enp1s0.202" = {
id = 202;
@ -98,12 +82,6 @@
services.radvd.enable = true;
services.radvd.config = ''
interface net-heimnetz {
AdvSendAdvert on;
prefix 2001:4cd8:100:1337::/64 {};
RDNSS fd00:152:152::1 {};
DNSSL net.clerie.de {};
};
interface enp1s0.202 {
AdvSendAdvert on;
prefix 2001:4cd8:100:1313::/64 {};
@ -115,7 +93,7 @@
enable = true;
settings = {
interfaces-config = {
interfaces = [ "net-heimnetz" "enp1s0.202" "enp1s0.204" ];
interfaces = [ "enp1s0.202" "enp1s0.204" ];
service-sockets-max-retries = 15;
service-sockets-retry-wait-time = 2000;
};
@ -164,30 +142,6 @@
}
];
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";
}
];
}
# Gastnetz
{
id = 202;

View File

@ -0,0 +1,66 @@
{ ... }:
{
## 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";
}
];
}
];
};
};
}