Files
nixos/modules/nixos/adblock-update.nix
T
Greg Hellings f8cc47614f
buildbot/nix-eval Build done.
buildbot/nix-build gitea:greg/nixos#checks.aarch64-darwin.pkg-adblock_update Build done.
buildbot/nix-build Build done.
Update flake.lock / update-flake-lock (push) Failing after 8s
Update manifest chart versions / update-manifests (push) Successful in 4s
chore: remove unused genesis config bits
2026-04-24 18:56:10 -05:00

36 lines
763 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.greg.adblockUpdate;
in
{
options.greg.adblockUpdate = {
enable = lib.mkEnableOption "Enable auto-update of block list";
};
config = lib.mkIf cfg.enable {
systemd = {
services.adblock-update = {
after = [ "network-online.target" ];
requires = [ "network-online.target" ];
script = lib.getExe pkgs.adblockUpdate;
serviceConfig.Type = "oneshot";
};
timers.adblock-update = {
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
requires = [ "network-online.target" ];
timerConfig = {
OnCalendar = "daily";
Unit = "adblock-update.service";
};
};
};
};
}