Prove in DHCP

This commit is contained in:
pazpi 2024-07-17 16:28:23 +02:00
parent da66650a9f
commit bb38b1b852

View file

@ -3,20 +3,22 @@
networking = { networking = {
useDHCP = true;
# If you prefer DHCP # If you prefer DHCP
# interfaces.eth0.useDHCP = true; interfaces.eth0.useDHCP = true;
# We don't use DHCP, so we configure it statically. # We don't use DHCP, so we configure it statically.
interfaces.eth0.ipv4.addresses = [{ # interfaces.eth0.ipv4.addresses = [{
address = "10.42.135.101"; # address = "10.42.135.101";
prefixLength = 24; # prefixLength = 24;
}]; # }];
# We can access the internet through this interface. # # We can access the internet through this interface.
defaultGateway = { # defaultGateway = {
address = "10.42.135.1"; # address = "10.42.135.1";
interface = "eth0"; # interface = "eth0";
}; # };
# Since we don't use DHCP, we need to set our own nameservers. # Since we don't use DHCP, we need to set our own nameservers.
nameservers = [ "1.1.1.1" "1.0.0.1" ]; nameservers = [ "1.1.1.1" "1.0.0.1" ];