Fix adblock at system start
This commit is contained in:
parent
8ce6f14447
commit
dcbe3fb40e
1 changed files with 6 additions and 7 deletions
|
@ -59,14 +59,12 @@
|
||||||
postStop = "systemctl try-reload-or-restart unbound";
|
postStop = "systemctl try-reload-or-restart unbound";
|
||||||
path = with pkgs; [ gawk wget ];
|
path = with pkgs; [ gawk wget ];
|
||||||
script = ''
|
script = ''
|
||||||
wget -nv -O - https://raw.githubusercontent.com/hagezi/dns-blocklists/main/unbound/tif.blacklist.conf > /etc/unbound/new.conf
|
wget -nv -O - https://raw.githubusercontent.com/hagezi/dns-blocklists/main/unbound/tif.blacklist.conf > /tmp/new.conf
|
||||||
echo 'local-zone: "iogames.space." always_nxdomain' >> /etc/unbound/new.conf
|
echo 'local-zone: "iogames.space." always_nxdomain' >> /tmp/new.conf
|
||||||
echo 'local-zone: "taming.io." always_nxdomain' >> /etc/unbound/new.conf
|
echo 'local-zone: "taming.io." always_nxdomain' >> /tmp/new.conf
|
||||||
awk '!seen[$0]++' /etc/unbound/new.conf > /etc/unbound/ads.conf
|
awk '!seen[$0]++' /tmp/new.conf > /etc/unbound/ads.conf
|
||||||
rm /etc/unbound/new.conf
|
rm /tmp/new.conf
|
||||||
'';
|
'';
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
before = [ "unbound.service" ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -85,6 +83,7 @@
|
||||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||||
"/etc/ssh/ssh_host_ed25519_key"
|
"/etc/ssh/ssh_host_ed25519_key"
|
||||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||||
|
"/etc/unbound/ads.conf"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue