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: optional NetworkManager dnsmasq integration #25337

Merged
merged 1 commit into from Apr 30, 2017

Conversation

benley
Copy link
Member

@benley benley commented Apr 30, 2017

Motivation for this change

Makes life easier with certain VPN setups, plus the usual benefits of running a local caching dns server. Leaving it off by default to avoid catching anybody by surprise.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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.

@mention-bot
Copy link

@benley, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rickynils, @domenkozar and @urkud to be potential reviewers.

@7c6f434c 7c6f434c merged commit 689916b into NixOS:master Apr 30, 2017
@CMCDragonkai
Copy link
Member

So useNetworkd is fine with services.dnsmasq but not networking.networkmanager.useDnsmasq?

However I've been noticing that my DNS server restarts every hour or so, and causes problems.

@CMCDragonkai
Copy link
Member

I see that the current configuration has this:

dns =
if cfg.useDnsmasq then "dnsmasq"
else if config.services.resolved.enable then "systemd-resolved"
else if config.services.unbound.enable then "unbound"
else "default";

This means useDnsmasq is a very different option compared to using config.services.resolved and config.services.unbound, which is done automatically based on whether those services are enabled or not?

In order to make this configuration more intuitive, is it a good idea to eventually move to integration of networkmanager with an existing dnsmasq service just like how it's automatically selecting on the basis of these other unbound and resolved services and then deprecate useDnsmasq?

@benley benley deleted the nm-dnsmasq branch December 6, 2017 07:35
@benley
Copy link
Member Author

benley commented Dec 6, 2017

is it a good idea to eventually move to integration of networkmanager with an existing dnsmasq service

Yes, probably. One of the complicating factors is probably going to be networkmanager wanting to launch dnsmasq on its own, whereas nixos would normally launch it as a systemd unit. Maybe networkmanager has gained some systemd integration in a recent release? That would be cool.

@fasheng
Copy link
Contributor

fasheng commented Dec 29, 2017

Well, some users like me just want disable NetworkManager's builtin dns operations with config dns=none in NetworkManager.conf. But looks this commit make it impossible ;(

So how about revert to the old option style like #15560 did?

+      dns = mkOption {
+        type = types.enum [ "default" "dnsmasq" "none" ];
+        default = "default";
+        description = ''
+          Set the DNS (resolv.conf) processing mode.
+        '';
+      };

By the way, NetworkManager in NixOS use builtin dnsmasq with argument --conf-dir=/etc/NetworkManager/dnsmasq.d that most distros did, hope this will be improved so user could customize the builtin dnsmasq.

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

5 participants