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

Add modules for tinydns and dnscache from djbdns #29450

Merged
merged 4 commits into from Sep 24, 2017
Merged

Conversation

jerith666
Copy link
Contributor

@jerith666 jerith666 commented Sep 16, 2017

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

mv -iv djbdns-man/*.$n man/man$n;
done;
rm -rv djbdns-man;
'';
Copy link
Member

Choose a reason for hiding this comment

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

What about meta? Do you want to maintain this package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, forgot to add that -- fixed in new commits!

@jerith666
Copy link
Contributor Author

@Mic92 your commits afd58bd and 9f80f65 also look like good improvements, I'll test them as soon as I can.

wantedBy = [ "multi-user.target" ];
path = with pkgs; [ daemontools djbdns ];
preStart = ''
rm -rf /var/lib/tinydns;
Copy link
Contributor

Choose a reason for hiding this comment

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

If the data is nuked on every startup, is there a benefit to allocating a static uid?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think not, but I didn't realize until I saw @Mic92's commits that it was even possible to not allocate a static uid. :) Will look into it.

@@ -297,6 +297,8 @@
clickhouse = 278;
rslsync = 279;
minio = 280;
tinydns = 281;
dnscache = 282;
Copy link
Member

Choose a reason for hiding this comment

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

Why did you remove these commits again?

with improvements suggested by Jörg Thalheim <joerg@thalheim.io>
with improvements suggested by Jörg Thalheim <joerg@thalheim.io>
@jerith666
Copy link
Contributor Author

Okay, I think all the issues have been addressed in the new versions of these commits that I just pushed. I've confirmed that I get working dns servers out of all of this. Please have another look -- thanks!


config = mkIf config.services.dnscache.enable {
environment.systemPackages = [ pkgs.djbdns ];
users.extraUsers.dnscache = {};
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the dnscache service supposed to run as this user? If so, add serviceConfig.User = "dnscache" to the unit definition below. I expect it then needs PermissionsStartOnly = true as well for the preStart script to work.

Copy link
Contributor

Choose a reason for hiding this comment

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

or does it do privsep itself, perhaps?

Copy link
Member

Choose a reason for hiding this comment

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

It does it itself also because it binds port 53.

(not strictly required to start the service)
@Mic92 Mic92 merged commit 975c7b2 into NixOS:master Sep 24, 2017
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

4 participants