From bc5c561775112a5cb4220e84ba58c4b7a031abc1 Mon Sep 17 00:00:00 2001 From: coolneng Date: Sun, 23 Oct 2022 10:47:58 +0200 Subject: [PATCH] Remove cainiao from DNS blocklist --- modules/periodic.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/periodic.nix b/modules/periodic.nix index bc32e90..53dd712 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -17,9 +17,11 @@ in { systemd.services.download-dns-blocklist = { description = "Download hosts-blocklists"; wantedBy = [ "default.target" ]; - path = with pkgs; [ curl ]; - script = - "curl -L https://github.com/notracking/hosts-blocklists/raw/master/dnsmasq/dnsmasq.blacklist.txt -o ${blocklist}"; + path = with pkgs; [ curl coreutils ]; + script = '' + curl -L https://github.com/notracking/hosts-blocklists/raw/master/dnsmasq/dnsmasq.blacklist.txt -o ${blocklist} + sed "/cainiao/d" -i ${blocklist} + ''; serviceConfig.Type = "oneshot"; postStop = '' chown -R dnsmasq ${stateDir}