Move networking stuff to separate file

This commit is contained in:
Pedro Rey Anca 2025-08-19 13:20:35 +02:00
parent 4011299399
commit a3123cfdec
Signed by: peprolinbot
GPG key ID: 053EA6E00116533A
2 changed files with 19 additions and 17 deletions

View file

@ -3,27 +3,11 @@
./modules/reverse-proxy.nix
./modules/home-assistant.nix
./modules/dyndns.nix
./modules/network.nix
];
services.logind.lidSwitch = "ignore";
boot.kernelParams = ["consoleblank=60"]; # Blanks console (screen off) after 60s
networking = {
interfaces = {
enp1s0.ipv4.addresses = [
{
address = "192.168.1.30";
prefixLength = 24;
}
];
};
defaultGateway = {
address = "192.168.1.1";
interface = "enp1s0";
};
nameservers = ["1.1.1.1" "8.8.8.8"];
};
system.stateVersion = "25.05";
}

View file

@ -0,0 +1,18 @@
{...}: {
networking = {
interfaces = {
enp1s0.ipv4.addresses = [
{
address = "192.168.1.30";
prefixLength = 24;
}
];
};
defaultGateway = {
address = "192.168.1.1";
interface = "enp1s0";
};
nameservers = ["1.1.1.1" "8.8.8.8"];
};
}