From 350fa9fbf1d26c4d6c9997d9574af82af308f4da Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sun, 22 Oct 2023 08:49:17 +0100 Subject: [PATCH] Add local rewrite for server domains Ignore same domains from statistics as querylog --- services/adguardhome/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/services/adguardhome/default.nix b/services/adguardhome/default.nix index f25587fe..44b21f19 100644 --- a/services/adguardhome/default.nix +++ b/services/adguardhome/default.nix @@ -5,7 +5,7 @@ services.adguardhome = { enable = true; mutableSettings = false; - settings = { + settings = rec { http.address = "0.0.0.0:3001"; dns = { bind_hosts = [ "127.0.0.1" "192.168.1.230" ]; @@ -13,11 +13,25 @@ ratelimit = 0; safe_search.enabled = true; }; + filtering = { + inherit (dns) safe_search; + rewrites = [ + { + domain = "xenia.me.uk"; + answer = "192.168.1.230"; + } + { + domain = "*.xenia.me.uk"; + answer = "A"; + } + ]; + }; querylog.ignored = [ "discovery.syncthing.net" "discovery-v6.syncthing.net" "matrix.tchncs.de" ]; + statistics = { inherit (querylog) ignored; }; }; openFirewall = true; };