From fd874b6998192cd1de63ee5ea3d0928c55ec23fc Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L de Mello" Date: Sat, 13 Sep 2025 22:11:06 -0300 Subject: [PATCH] feat: local abaduh.local domain for local services --- abaduh/adguard.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/abaduh/adguard.nix b/abaduh/adguard.nix index 6048f4e..a3feda2 100644 --- a/abaduh/adguard.nix +++ b/abaduh/adguard.nix @@ -10,6 +10,13 @@ in { openFirewall = true; port = 8753; settings = { + http = {address = "127.0.0.1:${toString port}";}; + filtering = { + rewrites = mapAttrsToList (domain: answer: {inherit domain answer;}) { + "abaduh.local" = "100.86.139.22"; + "*.abaduh.local" = "100.86.139.22"; + }; + }; filters = imap (id: url: { enabled = true; @@ -36,6 +43,13 @@ in { }; }; + services.caddy.virtualHosts."adguard.abaduh.local" = { + extraConfig = '' + reverse_proxy http://localhost:${toString cfg.port} + tls internal + ''; + }; + # Ports needed to access the DNS resolver networking.firewall.allowedTCPPorts = [53]; networking.firewall.allowedUDPPorts = [53 51820];