nixos/server/adguardhome.nix

22 lines
563 B
Nix
Raw Normal View History

2023-05-17 17:10:18 +01:00
{...}: {
imports = [./traefik.nix];
services.adguardhome = {
enable = true;
mutableSettings = true;
settings.bind_port = 3001;
openFirewall = true;
};
networking.firewall = {
2023-05-17 17:10:18 +01:00
allowedTCPPorts = [53];
allowedUDPPorts = [53];
};
services.traefik.dynamicConfigOptions.http = {
2023-05-17 17:10:18 +01:00
routers.adguard = {
rule = "Host(`guard.xenia.me.uk`)";
service = "adguard-webinterface";
tls = {certResolver = "default";};
};
services.adguard-webinterface.loadBalancer.servers = [{url = "http://localhost:3001";}];
};
}