Browse Source

Fix local-dns for newer nixos

Thomas Dy 3 years ago
parent
commit
5a2b1b2993
2 changed files with 4 additions and 0 deletions
  1. 1 0
      includes/local-dns/default.nix
  2. 3 0
      includes/local-dns/local-dns

+ 1 - 0
includes/local-dns/default.nix

@@ -10,6 +10,7 @@ in
 
   services.unbound = {
     enable = true;
+    enableRootTrustAnchor = false;
     extraConfig = ''
       include: /var/lib/unbound/unbound-resolvconf.conf
       remote-control:

+ 3 - 0
includes/local-dns/local-dns

@@ -47,16 +47,19 @@ function _alias {
   else
     echo "Removed aliases for $domain"
   fi
+  sudo nscd -i hosts
 }
 
 function _delegate {
   domain="$1"
   server="$2"
   _unbound forward_add "$domain" "$server"
+  sudo nscd -i hosts
 }
 
 function _reset {
   _unbound reload
+  sudo nscd -i hosts
 }
 
 function _list {