configurations for my servers and desktops
nix
nixos
flake
dots
dotfiles
1{...}: {
2 networking.firewall = {
3 allowedTCPPorts = [53];
4 allowedUDPPorts = [53];
5 };
6
7 services.blocky = {
8 enable = true;
9 settings = {
10 ports.dns = 53;
11 upstreams.groups.default = [
12 "9.9.9.9"
13 "https://dns.quad9.net/dns-query"
14 "1.1.1.1"
15 "https://one.one.one.one/dns-query"
16 ];
17 blocking = {
18 denylists = {
19 ads = [
20 "https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/wildcard/pro.txt"
21 ];
22 };
23 clientGroupsBlock = {
24 default = [
25 "ads"
26 ];
27 };
28 };
29 caching = {
30 minTime = "5m";
31 maxTime = "30m";
32 prefetching = true;
33 };
34 };
35 };
36}