nixos-config/hosts/nuc/modules/adguard/default.nix

19 lines
452 B
Nix

{ ... }:
let
domain = "adguard.vpn.rfive.de";
port = 3000;
in
{
networking.firewall.allowedTCPPorts = [ 53 ];
networking.firewall.allowedUDPPorts = [ 53 ];
services.adguardhome = {
enable = true;
settings = {
dns.bind_hosts = [ "192.168.42.2" ];
http.address = "127.0.0.1:${toString port}";
};
};
services.caddy.virtualHosts."http://${domain}".extraConfig = ''
reverse_proxy 127.0.0.1:${toString port}
'';
}