ensure ad list is built on startup

This commit is contained in:
Chris Dombroski 2024-05-06 19:13:12 -04:00
parent ac3767b1ec
commit 4b97ded8fd

View file

@ -54,7 +54,7 @@
systemd = {
services.adblock = {
startAt = "daily";
postStop = "systemctl reload unbound";
postStop = "systemctl try-reload-or-restart unbound";
path = with pkgs; [ gawk wget ];
script = ''
wget -O - https://raw.githubusercontent.com/hagezi/dns-blocklists/main/unbound/tif.blacklist.conf >> /etc/unbound/new.conf
@ -63,6 +63,8 @@
awk '!seen[$0]++' /etc/unbound/new.conf > /etc/unbound/ads.conf
rm /etc/unbound/new.conf
'';
wantedBy = [ "multi-user.target" ];
before = [ "unbound.service" ];
};
};