0c71fc9d1d
In the spirit of Marie Kondo, I'm tidying up! TL;DR: - Prefer .envrc `use_nix` and delete all dir-locals.nix files - Remove ~all references to <nixpkgs>, <unstable>, <depot> and prefer referencing each with briefcase.third_party.{pkgs,unstable,depot} - Delete nixBufferFromShell function since I was only using that in dir-locals.nix files
33 lines
643 B
Nix
33 lines
643 B
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
ghc = pkgs.haskellPackages.ghcWithPackages (hpkgs: [
|
|
hpkgs.time
|
|
hpkgs.aeson
|
|
hpkgs.either
|
|
]);
|
|
|
|
# This is the systemd service unit
|
|
service = pkgs.stdenv.mkDerivation {
|
|
name = "url-blocker";
|
|
src = builtins.path { path = ./.; name = "url-blocker"; };
|
|
buildPhase = ''
|
|
${ghc}/bin/ghc Main.hs
|
|
'';
|
|
installPhase = ''
|
|
mv ./Main $out
|
|
'';
|
|
};
|
|
|
|
# This is the systemd timer unit.
|
|
# Run once every minute.
|
|
# Give root privilege.
|
|
systemdUnit = {
|
|
systemd = {
|
|
timers.simple-timer = {
|
|
wantedBy = [ "timers.target" ];
|
|
partOf = [];
|
|
};
|
|
};
|
|
};
|
|
in null
|