75595b0126
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
12 lines
204 B
Nix
12 lines
204 B
Nix
let
|
|
pkgs = import <unstable> {};
|
|
in pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
(haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [
|
|
time
|
|
aeson
|
|
either
|
|
hspec
|
|
]))
|
|
];
|
|
}
|