feat[server]: network management

This commit is contained in:
Leon Schwarzäugl 2025-11-28 13:27:11 +01:00
parent d56d65aac5
commit 626d990b4a
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
17 changed files with 415 additions and 356 deletions

View file

@ -1,4 +1,4 @@
{ lib, config, minimal, ... }:
{ lib, config, minimal, globals, ... }:
{
imports = [
./hardware-configuration.nix
@ -35,19 +35,24 @@
{
"10-wan" = {
address = [
"${netConfig.wanAddress4}/32"
"${netConfig.wanAddress6}/64"
"${globals.networks."${if config.swarselsystems.isCloud then config.node.name else "home"}-${config.swarselsystems.server.localNetwork}".hosts.${config.node.name}.cidrv4}"
"${globals.networks."${if config.swarselsystems.isCloud then config.node.name else "home"}-${config.swarselsystems.server.localNetwork}".hosts.${config.node.name}.cidrv6}"
];
gateway = [ "fe80::1" ];
routes = [
{ Destination = netConfig.defaultGateway4; }
{
Gateway = netConfig.defaultGateway6;
GatewayOnLink = true;
}
{
Gateway = netConfig.defaultGateway4;
GatewayOnLink = true;
}
];
networkConfig = {
IPv6PrivacyExtensions = true;
IPv6AcceptRA = false;
};
matchConfig.MACAddress = netConfig.networks.${config.swarselsystems.server.localNetwork}.mac;
networkConfig.IPv6PrivacyExtensions = "yes";
linkConfig.RequiredForOnline = "routable";
};
};