-
-
Save notgne2/d8395f4612852b1f3344c4765a8d4d2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemd.services.hostsblock = { | |
wantedBy = [ "default.target" ]; | |
serviceConfig = { | |
Type = "simple"; | |
ExecStart = "${pkgs.curl}/bin/curl https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts -o /var/lib/hostsblock"; | |
}; | |
}; | |
systemd.timers.hostsblock = { | |
timerConfig = { | |
Unit = "hostsblock.service"; | |
OnCalendar = "daily"; | |
}; | |
wantedBy = [ "default.target" ]; | |
}; | |
networking.extraHosts = builtins.readFile /var/lib/hostsblock; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment