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