Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support configuring network locations #1048

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tjni
Copy link

@tjni tjni commented Aug 27, 2024

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"
      ];
    };
  };
};

@Enzime
Copy link
Collaborator

Enzime commented Sep 12, 2024

Can you rebase this on master?

@tjni tjni force-pushed the network-locations branch 2 times, most recently from 04a1cba to c7bf74e Compare September 12, 2024 21:07
@tjni
Copy link
Author

tjni commented Sep 12, 2024

Done!

@Enzime Enzime changed the title Support configuring network locations. Support configuring network locations Sep 24, 2024
@tjni tjni force-pushed the network-locations branch 3 times, most recently from 60e32dc to 690601e Compare October 28, 2024 16:57
@tjni tjni force-pushed the network-locations branch 4 times, most recently from 82bec0b to 630c7c6 Compare November 9, 2024 19:39
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.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants