workstations | add timers for task sync & vdirsyncer

This commit is contained in:
Don Harper 2026-01-19 23:27:21 -06:00
parent 25d3a09e27
commit e0d5b32dfd

View file

@ -50,7 +50,6 @@ in {
}; };
check-nic = { check-nic = {
description = "Adjust tailscale MTU based on location"; description = "Adjust tailscale MTU based on location";
unitConfig = { Type = "simple"; };
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
Environment = Environment =
@ -58,24 +57,62 @@ in {
ExecStart = "/home/don/bin/check-nic"; ExecStart = "/home/don/bin/check-nic";
}; };
}; };
task-sync = {
description = "Sync taskwarrior";
serviceConfig = {
Type = "oneshot";
Environment =
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/home/don/bin/sync-task";
};
};
vdirsyncer = {
description = "Synchronize calendars and contacts";
serviceConfig = {
Type = "oneshot";
Environment =
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
ExecStart = "/etc/profiles/per-user/don/bin/vdirsyncer sync";
};
};
}; };
timers = { timers = {
check-nic = { check-nic = {
description = "Adjust tailscale MTU based on location";
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
partOf = [ "check-nic.service" ];
timerConfig = { timerConfig = {
OnCalendar = "1m"; OnUnitActiveSec = "1min";
OnBootSec = "1m";
AccuracySec = "1m";
Unit = "check-nic.service"; Unit = "check-nic.service";
}; };
}; };
detect-reboot-for-upgrade = { detect-reboot-for-upgrade = {
description = "Check if need to reboot for new kernel";
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
partOf = [ "detect-reboot-for-upgrade.service" ];
timerConfig = { timerConfig = {
OnCalendar = "hourly"; OnUnitActiveSec = "hourly";
Unit = "detect-reboot-for-upgrade.service"; Unit = "detect-reboot-for-upgrade.service";
}; };
}; };
task-sync = {
description = "Sync taskwarrior";
wantedBy = [ "timers.target" ];
timerConfig = {
OnUnitActiveSec = "5min";
OnBootSec = "1m";
AccuracySec = "1m";
Unit = "task-sync.service";
};
};
vdirsyncer = {
description = "Synchronize calendars and contacts";
wantedBy = [ "timers.target" ];
timerConfig = {
OnUnitActiveSec = "5min";
Unit = "vdirsyncer.service";
};
};
}; };
}; };
}; };