dotfiles/nixos/services/taskwarrior.nix
2024-11-07 16:25:41 -07:00

26 lines
547 B
Nix

#
# Taskwarrior automatic syncing.
#
{ pkgs, ... }:
{
# Set up a timer to run sync every 5 minutes...
systemd.timers."taskwarrior-sync" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "5m";
OnUnitActiveSec = "5m";
Unit = "taskwarrior-sync.service";
};
};
# ... which just runs the "task sync" task, if we can.
systemd.services."taskwarrior-sync" = {
script = "${pkgs.taskwarrior3}/bin/task sync";
serviceConfig = {
Type = "oneshot";
User = "deprekated";
};
};
}