refactor: migrate architect network config to pepe.core.network module structure

This commit is contained in:
Giulio De Pasquale (aider) 2025-04-26 17:06:29 +01:00
parent 9f0a119c8e
commit 309872f4f2

View File

@ -39,9 +39,10 @@ in
age.identityPaths = [ "/root/.ssh/id_ed25519" ]; age.identityPaths = [ "/root/.ssh/id_ed25519" ];
architect = { pepe.core.network.interfaces = {
networks.lan = { lan = {
interface = "enp6s0"; interface = "enp6s0";
type = "lan";
net = "10.0.0.0/24"; net = "10.0.0.0/24";
devices = { devices = {
architect = { address = "10.0.0.250"; hostname = "architect.${domain}"; }; architect = { address = "10.0.0.250"; hostname = "architect.${domain}"; };
@ -51,6 +52,9 @@ in
lgtv = { address = "10.0.0.202"; hostname = "lgtv.${domain}"; }; lgtv = { address = "10.0.0.202"; hostname = "lgtv.${domain}"; };
}; };
}; };
};
architect = {
firewall = { firewall = {
openTCP = [ 22 ]; openTCP = [ 22 ];
@ -73,7 +77,7 @@ in
}; };
}; };
kernelParams = with config.architect.networks.lan; [ kernelParams = with config.pepe.core.network.interfaces.lan; [
"ip=${devices.architect.address}::${devices.brigettine.address}:255.255.255.0::${interface}:off" "ip=${devices.architect.address}::${devices.brigettine.address}:255.255.255.0::${interface}:off"
]; ];
@ -92,7 +96,7 @@ in
tmp.tmpfsSize = "50%"; tmp.tmpfsSize = "50%";
}; };
networking = with config.architect.networks.lan; { networking = with config.pepe.core.network.interfaces.lan; {
hostName = "architect"; hostName = "architect";
hostId = "49350853"; hostId = "49350853";
useDHCP = false; useDHCP = false;
@ -103,7 +107,7 @@ in
prefixLength = 24; prefixLength = 24;
}]; }];
}; };
extraHosts = (generateDeviceStrings config.architect.networks.lan.devices) + '' extraHosts = (generateDeviceStrings config.pepe.core.network.interfaces.lan.devices) + ''
# Blacklist # Blacklist
0.0.0.0 metrics.plex.tv 0.0.0.0 metrics.plex.tv