Configure AdGuard declaratively

This commit is contained in:
Paul-Henri Froidmont 2022-09-05 19:26:33 +02:00
parent 46f41ae79b
commit ada82a3768
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE

View file

@ -103,9 +103,27 @@
services.adguardhome = { services.adguardhome = {
enable = true; enable = true;
host = "0.0.0.0";
port = 80;
openFirewall = true;
settings = {
auth_attempts = 5;
block_auth_min = 15;
dns = {
bind_host = "0.0.0.0";
port = 53;
statistics_interval = 90;
querylog_enabled = true;
querylog_interval = 90;
upstream_dns = [ "tls://doh.mullvad.net" ];
bootstrap_dns = "9.9.9.10";
};
};
}; };
networking.firewall.allowedTCPPorts = [ 53 80 ]; networking.firewall.allowedTCPPorts = [ 53 ];
networking.firewall.allowedUDPPorts = [ 53 ]; networking.firewall.allowedUDPPorts = [ 53 ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [