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

nixos: Add option networking.networkmanager.dynamicHosts #41715

Merged

Conversation

rickynils
Copy link
Member

Motivation for this change

This allows non-privileged users to configure local DNS
entries by editing hosts files read by NetworkManager's dnsmasq
instance.

This adds a new option networking.networkmanager.dynamicHosts, and if it isn't enabled (disabled by default), nothing will change for end users.

If this is accepted, I'll create a PR for master too.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

This allows non-privileged users to configure local DNS
entries by editing hosts files read by NetworkManager's dnsmasq
instance.
@rickynils
Copy link
Member Author

I'm going to merge this, since it has been working flawlessly for me for a long time, and since nothing will be affected if the option is not enabled. If someone strongly opposes this, I'll revert it.

@rickynils rickynils merged commit dad6f73 into NixOS:release-18.03 Jul 3, 2018
@tasmo
Copy link
Contributor

tasmo commented Jul 3, 2018

After an nixos-rebuild switch I get the following error:

building Nix...
building the system configuration...
error:
Failed assertions:
- To use networking.networkmanager.dynamicHosts you also need to enable
networking.networkmanager.useDnsmasq

I tried to set networking.networkmanager.dynamicHosts.enable = false; as well as networking.networkmanager.useDnsmasq = true; without success.

What do I miss?

@rickynils
Copy link
Member Author

@tasmo Fixed in 5a56600. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants