TL;DR:
- Write FromJSON instances to decode rules.json file
- Prefer Text to String and use the OverloadedStrings language extension
- Read /etc/hosts and append the serialized rules.json to the end
Notes:
- I can remove some of the FromJSON instances and use GHC Generics to define
them for me.
TODO:
- Define the systemd timer unit for this to run
- Ensure script can run with root privileges
I'd like to ensure that my /etc/hosts file blocks websites at certains times. I
use this to allow / disallow websites at various times of the day.
TODO:
- Add project README
- Add tests
- Publish
- Create a Nix derivation
- Run as a systemd timer unit
- Figure out if I can run this as a user rather than root