git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #91514 from NinjaTrappeur/nin-fix-nsdconf

nixos/nsd: symlink conf file to /etc/nsd

commitb2655b6a34df02147082518d363bbb39264ef30a authorChristoph Hrdinka <c.github@hrdinka.at> dateFri 26 Jun 2020, 23:24 (6 years ago) parentdbb7aae7020dc8
2 files changed+10−5
nixos/modules/services/networking/nsd.nix+4−3 pkgs/servers/dns/nsd/default.nix+6−2
nixos/modules/services/networking/nsd.nix+4−3
@@ -11,8 +11,6 @@ let
1111
1212 # build nsd with the options needed for the given config
1313 nsdPkg = pkgs.nsd.override {
14− configFile = "${configFile}/nsd.conf";
15−
1614 bind8Stats = cfg.bind8Stats;
1715 ipv6 = cfg.ipv6;
1816 ratelimit = cfg.ratelimit.enable;
@@ -897,7 +895,10 @@ in
897895 + "want, please enable 'services.nsd.rootServer'.";
898896 };
899897
900− environment.systemPackages = [ nsdPkg ];
898+ environment = {
899+ systemPackages = [ nsdPkg ];
900+ etc."nsd/nsd.conf".source = "${configFile}/nsd.conf";
901+ };
901902
902903 users.groups.${username}.gid = config.ids.gids.nsd;
903904
pkgs/servers/dns/nsd/default.nix+6−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, libevent, openssl
1+{ stdenv, fetchurl, libevent, openssl, nixosTests
22, bind8Stats ? false
33, checking ? false
44, ipv6 ? true
@@ -11,7 +11,7 @@
1111, rrtypes ? false
1212, zoneStats ? false
1313
14−, configFile ? "etc/nsd/nsd.conf"
14+, configFile ? "/etc/nsd/nsd.conf"
1515}:
1616
1717stdenv.mkDerivation rec {
@@ -52,6 +52,10 @@ stdenv.mkDerivation rec {
5252 sed 's@$(INSTALL_DATA) nsd.conf.sample $(DESTDIR)$(nsdconfigfile).sample@@g' -i Makefile.in
5353 '';
5454
55+ passthru.tests = {
56+ inherit (nixosTests) nsd;
57+ };
58+
5559 meta = with stdenv.lib; {
5660 homepage = "http://www.nlnetlabs.nl";
5761 description = "Authoritative only, high performance, simple and open source name server";