I spent some time implementing a Pi-hole module for NixOS, but eventually decided to go for a much simpler setup: dns server (dnsmasq or unbound) + periodically updated hosts file (via systemd timer) passed to the dns server.
At the end of the day, that’s really all you need as a technical user, so I couldn’t justify he rest of what came with pi-hole, which I believe targets a less tech-savvy crowd.
YMMV and I’m very happy Pi-hole exists, I think I’m just not the target audience.
I invite you to look at the codebase more closely. Pi-hole is a fork of dnsmasq (FTL), a PHP web app, and a python web application, plus a bunch of shell scripts.
Compared to what I linked above, there's really no comparison in terms of simplicity.
You literally said: "dnsmasq + periodically updated hosts file".
That is what PiHole, in its core, is!
The rest is just for the webserver, dashboard and API. You don't really need that. Sure, you're solution requires less code but I don't think it's easier to setup or manage.
> The rest is just for the webserver, dashboard and API. You don't really need that. Sure, you're solution requires less code but I don't think it's easier to setup or manage.
I think this really depends on who you are. For me, using a systemd timer and a systemd service is easier than the set of ad-hoc solutions Pi-hole uses. For someone else, probably Pi-hole is easier. That was my point in the OP.
At the end of the day, that’s really all you need as a technical user, so I couldn’t justify he rest of what came with pi-hole, which I believe targets a less tech-savvy crowd.
YMMV and I’m very happy Pi-hole exists, I think I’m just not the target audience.
--
EDIT: see here[0] for an example configuration.
[0]: https://deadc0de.re/articles/unbound-blocking-ads.html