don/systemd.nix | testing doing this

This commit is contained in:
Don Harper 2023-04-04 07:19:49 -05:00
parent 41f54c0fa3
commit 18ff37fe2c

46
user/don/systemd.nix Normal file
View file

@ -0,0 +1,46 @@
{pkgs, ...}:
{
systemd.user = {
services.mbsync = {
serviceConfig = {
Type = "oneshot";
Environment = "PATH=/run/current-system/sw/bin";
ExecStart = "/home/don/bin/mbsync";
RuntimeMaxSec = "3m";
};
};
services."mbsync-all" = {
serviceConfig = {
Type = "oneshot";
Environment = "PATH=/run/current-system/sw/bin";
ExecStart = "/home/don/bin/mbsync gmail";
RuntimeMaxSec = "3m";
};
};
timers.mbsync = {
timerConfig = {
OnBoot = "1m";
OnUnitActiveSec = "5m";
AccuracySec = "1m";
Unit = "mbsync.service";
};
wantedBy = [ "timers.target" ];
partOf = [ "mbsync.service" ];
};
timers."mbsync-all" = {
timerConfig = {
OnBoot = "10m";
OnUnitActiveSec = "14m";
AccuracySec = "1m";
Unit = "mbsync-all.service";
};
wantedBy = [ "timers.target" ];
partOf = [ "mbsync-all.service" ];
};
};
}