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.

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
lforst Luca Forstner
This allows non-privileged users to configure local DNS
entries by editing hosts files read by NetworkManager's dnsmasq
instance.
@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jun 8, 2018
@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 added a commit that referenced this pull request Jul 3, 2018

Verified

This commit was signed with the committer’s verified signature.
lforst Luca Forstner
@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
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants