network: use internal domains

This commit is contained in:
Rouven Seifert 2025-05-09 14:25:56 +02:00
parent f511f7d146
commit cc59943638
Signed by: rouven.seifert
SSH key fingerprint: SHA256:WedRxwyCvqwDG6cd16qf/fizYDK1pvN4p5bawXlnKk0
7 changed files with 40 additions and 34 deletions

View file

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