Skip to content
New issue

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

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

Already on GitHub? Sign in 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!

@tjni tjni force-pushed the network-locations branch from c7bf74e to ebe9356 Compare September 13, 2024 03:36
@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
@tjni tjni force-pushed the network-locations branch from 630c7c6 to a560de3 Compare November 12, 2024 18:34
@tjni tjni force-pushed the network-locations branch 2 times, most recently from a568db3 to b185b6a Compare November 23, 2024 16:43
@tjni tjni force-pushed the network-locations branch 3 times, most recently from 4b61dfe to 4e03543 Compare December 4, 2024 17:28
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.
@tjni tjni force-pushed the network-locations branch from 4e03543 to 27be7a7 Compare December 7, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants