pkgs/dns-slaves: init
This commit is contained in:
parent
023282e0a1
commit
88e67c827b
|
@ -55,7 +55,11 @@ let
|
|||
inherit self nixpkgs system;
|
||||
};
|
||||
|
||||
dns-slaves = import ./dns-slaves.nix {
|
||||
inherit self nixpkgs system;
|
||||
};
|
||||
|
||||
in
|
||||
salt-pillars // rootfs-packages // vm-packages // device-templates // {
|
||||
inherit export-config;
|
||||
inherit export-config dns-slaves;
|
||||
}
|
||||
|
|
22
nix/pkgs/dns-slaves.nix
Normal file
22
nix/pkgs/dns-slaves.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ self, nixpkgs, system }:
|
||||
|
||||
with nixpkgs.legacyPackages.${system};
|
||||
|
||||
writeText "named.slave.conf" (
|
||||
lib.concatMapStringsSep "\n" ({ name, ns, ... }: ''
|
||||
zone "${name}" IN {
|
||||
type slave;
|
||||
masters {
|
||||
2a02:8106:208:5282:2::2;
|
||||
fd23:42:c3d2:582:2::2;
|
||||
172.20.73.2;
|
||||
};
|
||||
file "/var/lib/bind/slave/${name}.zone";
|
||||
};
|
||||
'') (
|
||||
# public zones only
|
||||
builtins.filter ({ ns, ... }:
|
||||
ns == self.lib.dns.publicNS
|
||||
) self.lib.dns.localZones
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue
Block a user