2023-10-22 06:07:05 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2023-10-21 17:55:11 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
imports = [ ../traefik/adguardhome.nix ];
|
2023-05-26 08:52:46 +01:00
|
|
|
services.adguardhome = {
|
|
|
|
enable = true;
|
2023-10-22 06:07:05 +01:00
|
|
|
mutableSettings = false;
|
2023-10-22 08:49:17 +01:00
|
|
|
settings = rec {
|
2023-10-27 05:56:55 +01:00
|
|
|
http.address = "0.0.0.0:3200";
|
2023-10-22 06:45:46 +01:00
|
|
|
dns = {
|
|
|
|
bind_hosts = [ "127.0.0.1" "192.168.1.230" ];
|
|
|
|
bootstrap_dns = [ "9.9.9.9" "149.112.112.10" ];
|
|
|
|
ratelimit = 0;
|
|
|
|
safe_search.enabled = true;
|
2023-10-22 08:49:17 +01:00
|
|
|
rewrites = [
|
|
|
|
{
|
|
|
|
domain = "xenia.me.uk";
|
|
|
|
answer = "192.168.1.230";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
domain = "*.xenia.me.uk";
|
|
|
|
answer = "A";
|
|
|
|
}
|
|
|
|
];
|
2023-10-22 09:03:51 +01:00
|
|
|
blocked_services.ids = [ "amazon" "facebook" "twitter" ];
|
2023-10-22 08:49:17 +01:00
|
|
|
};
|
2023-10-22 09:03:51 +01:00
|
|
|
filtering = { inherit (dns) safe_search rewrites blocked_services; };
|
2023-10-22 08:00:51 +01:00
|
|
|
querylog.ignored = [
|
|
|
|
"discovery.syncthing.net"
|
|
|
|
"discovery-v6.syncthing.net"
|
|
|
|
"matrix.tchncs.de"
|
|
|
|
];
|
2023-10-22 08:49:17 +01:00
|
|
|
statistics = { inherit (querylog) ignored; };
|
2023-10-22 06:07:05 +01:00
|
|
|
};
|
2023-05-26 08:52:46 +01:00
|
|
|
openFirewall = true;
|
|
|
|
};
|
|
|
|
networking.firewall = {
|
2023-10-21 17:55:11 +01:00
|
|
|
allowedTCPPorts = [ 53 ];
|
|
|
|
allowedUDPPorts = [ 53 ];
|
2023-05-26 08:52:46 +01:00
|
|
|
};
|
|
|
|
}
|