workstations | add timers for task sync & vdirsyncer
This commit is contained in:
parent
25d3a09e27
commit
e0d5b32dfd
1 changed files with 42 additions and 5 deletions
|
|
@ -50,7 +50,6 @@ in {
|
|||
};
|
||||
check-nic = {
|
||||
description = "Adjust tailscale MTU based on location";
|
||||
unitConfig = { Type = "simple"; };
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
Environment =
|
||||
|
|
@ -58,24 +57,62 @@ in {
|
|||
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 = {
|
||||
check-nic = {
|
||||
description = "Adjust tailscale MTU based on location";
|
||||
wantedBy = [ "timers.target" ];
|
||||
partOf = [ "check-nic.service" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "1m";
|
||||
OnUnitActiveSec = "1min";
|
||||
OnBootSec = "1m";
|
||||
AccuracySec = "1m";
|
||||
Unit = "check-nic.service";
|
||||
};
|
||||
};
|
||||
detect-reboot-for-upgrade = {
|
||||
description = "Check if need to reboot for new kernel";
|
||||
wantedBy = [ "timers.target" ];
|
||||
partOf = [ "detect-reboot-for-upgrade.service" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "hourly";
|
||||
OnUnitActiveSec = "hourly";
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue