aszlig 751bdacc9b
nixos/nsd: Don't override bind via nixpkgs.config
When generating values for the services.nsd.zones attribute using values
from pkgs, we'll run into an infinite recursion because the nsd module
has a condition on the top-level definition of nixpkgs.config.

While it would work to push the definition a few levels down, it will
still only work if we don't use bind tools for generating zones.

As far as I could see, Python support for BIND seems to be only needed
for the dnssec-* tools, so instead of using nixpkgs.config, we now
directly override pkgs.bind instead of globally in nixpkgs.

To illustrate the problem with a small test case, instantiating the
following Nix expression from the nixpkgs source root will cause the
mentioned infinite recursion:

  (import ./nixos {
    configuration = { lib, pkgs, ... }: {
      services.nsd.enable = true;
      services.nsd.zones = import (pkgs.writeText "foo.nix" ''
        { "foo.".data = "xyz";
          "foo.".dnssec = true;
        }
      '');
    };
  }).vm

With this change, generating zones via import-from-derivation is now
possible again.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @pngwjpgh
2019-01-04 01:49:50 +01:00
..
2016-10-17 16:20:24 +02:00
2018-04-26 13:57:11 +03:00
2018-09-29 20:51:11 -04:00
2018-05-02 10:30:30 -04:00
2016-11-23 15:23:10 +01:00
2017-09-09 00:29:46 +02:00
2018-07-20 18:48:37 +00:00
2016-09-23 02:02:20 +10:00
2018-09-06 12:38:30 +02:00
2018-09-23 15:26:55 +03:00
2017-05-18 15:57:26 +02:00
2018-07-20 18:48:37 +00:00
2018-11-25 14:24:10 +01:00
2018-05-05 00:33:20 -05:00
2018-02-20 10:14:55 +00:00
2018-09-06 16:31:20 +02:00
2018-08-01 21:39:09 +02:00
2018-11-07 14:51:45 +02:00
2016-12-05 13:37:08 +01:00
2018-12-17 01:01:41 +01:00
2018-04-13 13:39:21 +03:00
2018-01-21 11:23:07 +00:00