2021-07-26 01:29:05 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
dns = import (builtins.fetchTarball "https://github.com/kirelagin/dns.nix/archive/master.tar.gz");
|
|
|
|
my = config.my;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
services.unbound = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
server = {
|
|
|
|
access-control = [ "127.0.0.0/8 allow" "::1/128 allow" ] ++ map (v: "${v} allow") my.privateRanges;
|
|
|
|
interface = [ "127.0.0.1" ] ++ my.ipv4;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.nsd = {
|
|
|
|
enable = true;
|
|
|
|
interfaces = my.ipv6.standard;
|
|
|
|
zones = {
|
|
|
|
${my.subZone} = {
|
2021-07-28 23:55:23 +02:00
|
|
|
data = dns.lib.toString my.subZone (import ./subZone.nix { inherit dns config lib; });
|
2021-07-26 01:29:05 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|