2023-12-03 02:24:11 -05:00
|
|
|
{pihole, ...}: {
|
|
|
|
imports = [pihole.nixosModules.default];
|
|
|
|
|
|
|
|
services.pihole = {
|
|
|
|
enable = true;
|
|
|
|
|
2023-12-06 13:59:14 -05:00
|
|
|
dnsPort = 53;
|
2023-12-03 02:24:11 -05:00
|
|
|
webPort = 8080;
|
|
|
|
|
|
|
|
piholeConfig = {
|
|
|
|
ftl = {
|
2023-12-06 01:55:59 -05:00
|
|
|
# Defaults
|
|
|
|
PRIVACYLEVEL = "0";
|
|
|
|
RATE_LIMIT = "1000/60";
|
2023-12-03 02:24:11 -05:00
|
|
|
};
|
|
|
|
|
2023-12-06 01:55:59 -05:00
|
|
|
interface = "tailscale0";
|
|
|
|
|
2023-12-03 02:24:11 -05:00
|
|
|
web = {
|
2023-12-06 01:55:59 -05:00
|
|
|
theme = "default-darker";
|
2023-12-03 02:24:11 -05:00
|
|
|
virtualHost = "pi.hole";
|
|
|
|
password = "password";
|
|
|
|
};
|
2023-12-06 01:55:59 -05:00
|
|
|
|
2023-12-06 13:59:14 -05:00
|
|
|
# Declaratively set the DNS settings
|
|
|
|
# in Settings -> DNS -> Interface settings
|
|
|
|
dnsmasq.extraConfig = ''
|
|
|
|
interface=tailscale0
|
|
|
|
except-interface=nonexisting
|
|
|
|
'';
|
|
|
|
|
2023-12-06 01:55:59 -05:00
|
|
|
# Handle it with unbound
|
|
|
|
dns.upstreamServers = [
|
|
|
|
"127.0.0.1#5335"
|
|
|
|
"127.0.0.1#5335"
|
|
|
|
];
|
2023-12-03 02:24:11 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|