summaryrefslogtreecommitdiff
path: root/config/dns.nix
diff options
context:
space:
mode:
Diffstat (limited to 'config/dns.nix')
-rw-r--r--config/dns.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/config/dns.nix b/config/dns.nix
index edf9a0e..9f05807 100644
--- a/config/dns.nix
+++ b/config/dns.nix
@@ -1,11 +1,26 @@
# dnssec-signzone -A -3 $(head -c 1000 /dev/urandom | sha1sum | cut -b 1-16) -N unixtime -o $zone -t db.${zone}
{ config, lib, pkgs, ... }:
+let
+ zones = pkgs.callPackage ../pkgs/zone-files/default.nix { };
+in
{
services.bind = {
enable = true;
+ extraConfig = ''
+ zone orbekk.com {
+ type master;
+ file "/var/run/named/db.orbekk.com.zone";
+ auto-dnssec maintain;
+ key-directory "/opt/secret/bind/orbekk.com";
+ update-policy local;
+ allow-query { any; };
+ };
+ '';
};
systemd.services.bind = {
- preStart = lib.mkAfter "echo test";
+ preStart = lib.mkAfter ''
+ cp -f ${zones}/* /var/run/named/
+ '';
};
}