Hello Noé.
On 2025-10-26 21:54, Noé Lopez wrote:
Hi Thomas,
You can extend the hosts-service-type to block domains locally:
(simple-service 'add-extra-hosts
hosts-service-type
(list (host "100::" "reddit.com" '("www.reddit.com"))
(host "100::" "territorial.io" '())))
Mine is pretty simple for blocking sites I used to waste my time on. But
you could imagine using something like StevenBlack’s hosts collection[1]
to get a lot more blocks.
Thank you for the discovery of Steven Black hosts. I keep the resource
in mind, it will definitely be helpful at some point.
If you want to go that route, I can assist you as I would like to use
it. I already have a package for building that collection[2] but I
didn’t go further as to having it used in my Guix System.
I guess if I go that route, I will need an additional setup for the
system to act as a DNS. For now, I don't really know how to setup one
and that why the Adguard solution worked for me.
With Adguard, I just had to setup the DNS server adress on the gateway
to point to Adguard and that was it, all my home was protected.
I shall think about which solution is best. As always, it will be a
matter of adding dependencies versus having a home made solution that
adds complexity.
Good day,
Noé
[1]https://github.com/stevenBlack/hosts
[2]https://framagit.org/nll/bloup/-/blob/master/src/bloup/packages/hosts.scm#L11
Thank you,
Best,
Thomas
--
Thomas Bennett
développeur logiciel
--
https://caminu.fr
+33 6 06 69 76 21