This adds support for configuring DNS servers and search domains for each location.
This is exposed through the networking.location option. The networking.knownNetworkServices option now applies globally across all locations.
The networking.dns and networking.search options are now aliases under networking.location.Automatic, since the "Automatic" network location is the default location on an unconfigured system.
Below is a sample from my own configuration illustrating usage. I configure DNS servers on my Home location in order to bypass my AT&T router adding AT&T's DNS server automatically:
networking = {
knownNetworkServices = ["Wi-Fi"];
location = {
Automatic = {};
Home = {
# to avoid AT&T's slow DNS servers
dns = [
"2001:4860:4860:0:0:0:0:8888"
"2001:4860:4860:0:0:0:0:8844"
"8.8.8.8"
"8.8.4.4"
];
};
};
};
This adds support for configuring DNS servers and search domains for each location.
This is exposed through the
networking.location
option. Thenetworking.knownNetworkServices
option now applies globally across all locations.The
networking.dns
andnetworking.search
options are now aliases undernetworking.location.Automatic
, since the "Automatic" network location is the default location on an unconfigured system.Below is a sample from my own configuration illustrating usage. I configure DNS servers on my Home location in order to bypass my AT&T router adding AT&T's DNS server automatically: