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/nixops-dns: init #34511

Merged
merged 2 commits into from Feb 20, 2018
Merged

nixos/nixops-dns: init #34511

merged 2 commits into from Feb 20, 2018

Conversation

sorki
Copy link
Member

@sorki sorki commented Feb 2, 2018

Motivation for this change

More awesome NixOps experience.

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
    • 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.

@sorki
Copy link
Member Author

sorki commented Feb 2, 2018

CC @kamilchm, Requires #34510

in

{
options = {
Copy link
Member

@kamilchm kamilchm Feb 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing that needs to be considered - nixops database location. Current nixops-dns implementation will always look into current user home dir https://github.com/kamilchm/nixops-dns/blob/f6c3f79a09e649033b49e9403d654bdc1308612f/main.go#L20-L28
Do you have an idea how to make it usable in a system service?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to address this via user option (The user the nixops-dns daemon should run as.) which propagates to serviceConfig User = cfg.user; bellow. Not sure about the group tho.

];
extraConfig = ''
bind-interfaces
listen-address=127.0.0.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it not make more sense to set listenAddress to port 53 and give the service cap_net_bind_service capability to bind privileged ports? You can take a look at the caddy service on how to do this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be able to still resolve internet domains via dnsmasq while only *.ops are forwarded to nixops-dns

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be an option to disable dnsmasq in the nixops-dns module to make it less opinionated. Also it is a sane default some other people maybe prefer to run unbound or knot-resolver instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mic92 do you consider this a blocker or can it be added/iterated upon later?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update this to make dnsmasq setup an option (enabled by default).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@Mic92 Mic92 merged commit 7367918 into NixOS:master Feb 20, 2018
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