anchor.diff:    pidFile  = stateDir + "/var/nsd.pid";
   
     zoneFiles = pkgs.stdenv.mkDerivation {
  -      preferLocalBuild = true;
  -      name = "nsd-env";
  -      buildCommand = concatStringsSep "\n"
  -        [ "mkdir -p $out"
  -          (concatStrings (mapAttrsToList (zoneName: zoneOptions: ''
  -            cat > "$out/${zoneName}" <<_EOF_
  -            ${zoneOptions.data}
  -            _EOF_
  -          '') zoneConfigs))
  -        ];
  +    preferLocalBuild = true;
  +    name = "nsd-env";
  +    buildCommand = concatStringsSep "\n"
  +      [ "mkdir -p $out"
  +        (concatStrings (mapAttrsToList (zoneName: zoneOptions: ''
  +          cat > "$out/${zoneName}" <<_EOF_
  +          ${zoneOptions.data}
  +          _EOF_
  +        '') zoneConfigs))
  +      ];
     };
   
     configFile = pkgs.writeText "nsd.conf" ''
  
positive.code:         type        = types.attrsOf zoneOptions;
          default     = {};
          example     = {
              "serverGroup1" = {
                  provideXFR = [ "10.1.2.3 NOKEY" ];
                  children = {
                      "example.com." = {
                          data = ''
                            $ORIGIN example.com.
                            $TTL    86400
                            @ IN SOA a.ns.example.com. admin.example.com. (
                            ...
                          '';
                      };
                      "example.org." = {
                          data = ''
                            $ORIGIN example.org.
                            $TTL    86400
                            @ IN SOA a.ns.example.com. admin.example.com. (
                            ...
                          '';
                      };
                  };
              };
  
              "example.net." = {
                  provideXFR = [ "10.3.2.1 NOKEY" ];
                  data = ''...'';
              };
          };
          description = ''
            Define your zones here. Zones can cascade other zones and therefore
  
negative.code: 
        # fork -> pattern
        else zipAttrsWith (name: head) (
          mapAttrsToList (name: child: zoneConfigs' (parent // zone // { children = {}; }) name child)
                         zone.children
        );
  
    # fighting infinite recursion
  