networking: Unify underlay config across hosts

This commit is contained in:
SebastianStork 2026-01-30 20:39:59 +01:00
parent 1d1709e1ba
commit 27b5c57023
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
19 changed files with 240 additions and 258 deletions

View file

@ -24,9 +24,14 @@
de.hyprland.enable = true;
networking = {
overlay.address = "10.254.250.1";
underlay.interface = "enp6s0";
isClient = true;
overlay = {
address = "10.254.250.1";
role = "client";
};
underlay = {
interface = "enp6s0";
useDhcp = true;
};
};
services = {

View file

@ -33,16 +33,6 @@ _: {
'';
};
networking.useNetworkd = true;
systemd.network = {
enable = true;
networks."10-enp6s0" = {
matchConfig.Name = "enp6s0";
networkConfig.DHCP = "ipv4";
linkConfig.RequiredForOnline = "routable";
};
};
hardware.fancontrol = {
enable = true;
config = ''

View file

@ -24,15 +24,19 @@
de.hyprland.enable = true;
networking = {
overlay.address = "10.254.250.3";
underlay.interface = "wlan0";
isClient = true;
overlay = {
address = "10.254.250.3";
role = "client";
};
underlay = {
interface = "wlan0";
useDhcp = true;
wireless.enable = true;
};
};
services = {
resolved.enable = true;
auto-gc.enable = true;
wlan.enable = true;
bluetooth.enable = true;
sound.enable = true;
nebula.enable = true;

View file

@ -40,17 +40,4 @@
HibernateDelaySec=2h
HibernateOnACPower=yes
'';
networking.useNetworkd = true;
systemd.network = {
enable = true;
networks."10-wlan0" = {
matchConfig.Name = "wlan0";
linkConfig.RequiredForOnline = "routable";
networkConfig = {
DHCP = "yes";
IgnoreCarrierLoss = "3s";
};
};
};
}

View file

@ -16,14 +16,17 @@
boot.loader.grub.enable = true;
networking = {
overlay.address = "10.254.250.5";
overlay = {
address = "10.254.250.5";
isLighthouse = true;
role = "server";
};
underlay = {
interface = "enp1s0";
address = "188.245.223.145";
cidr = "188.245.223.145/32";
isPublic = true;
gateway = "172.31.1.1";
};
isLighthouse = true;
isServer = true;
};
services = {

View file

@ -1,4 +1,4 @@
{ modulesPath, lib, ... }:
{ modulesPath, ... }:
{
imports = [ "${modulesPath}/profiles/qemu-guest.nix" ];
@ -14,22 +14,4 @@
];
zramSwap.enable = true;
networking.useDHCP = false;
systemd.network = {
enable = true;
networks."10-enp1s0" = {
matchConfig.Name = "enp1s0";
linkConfig.RequiredForOnline = "routable";
address = [ "188.245.223.145/32" ];
routes = lib.singleton {
Gateway = "172.31.1.1";
GatewayOnLink = true;
};
dns = [
"1.1.1.1"
"8.8.8.8"
];
};
};
}

View file

@ -20,14 +20,17 @@
boot.loader.systemd-boot.enable = true;
networking = {
overlay.address = "10.254.250.2";
overlay = {
address = "10.254.250.2";
isLighthouse = true;
role = "server";
};
underlay = {
interface = "enp1s0";
address = "49.13.231.235";
cidr = "49.13.231.235/32";
isPublic = true;
gateway = "172.31.1.1";
};
isLighthouse = true;
isServer = true;
};
services = {

View file

@ -1,4 +1,4 @@
{ modulesPath, lib, ... }:
{ modulesPath, ... }:
{
imports = [ "${modulesPath}/profiles/qemu-guest.nix" ];
@ -14,22 +14,4 @@
];
zramSwap.enable = true;
networking.useDHCP = false;
systemd.network = {
enable = true;
networks."10-enp1s0" = {
matchConfig.Name = "enp1s0";
linkConfig.RequiredForOnline = "routable";
address = [ "49.13.231.235/32" ];
routes = lib.singleton {
Gateway = "172.31.1.1";
GatewayOnLink = true;
};
dns = [
"1.1.1.1"
"8.8.8.8"
];
};
};
}

View file

@ -20,13 +20,16 @@
boot.loader.systemd-boot.enable = true;
networking = {
overlay.address = "10.254.250.4";
overlay = {
address = "10.254.250.4";
role = "server";
};
underlay = {
interface = "enp1s0";
address = "167.235.73.246";
cidr = "167.235.73.246/32";
isPublic = true;
gateway = "172.31.1.1";
};
isServer = true;
};
services = {

View file

@ -1,4 +1,4 @@
{ modulesPath, lib, ... }:
{ modulesPath, ... }:
{
imports = [ "${modulesPath}/profiles/qemu-guest.nix" ];
@ -14,22 +14,4 @@
];
zramSwap.enable = true;
networking.useDHCP = false;
systemd.network = {
enable = true;
networks."10-enp1s0" = {
matchConfig.Name = "enp1s0";
linkConfig.RequiredForOnline = "routable";
address = [ "167.235.73.246/32" ];
routes = lib.singleton {
Gateway = "172.31.1.1";
GatewayOnLink = true;
};
dns = [
"1.1.1.1"
"8.8.8.8"
];
};
};
}