move systemd.nix to home collection

This commit is contained in:
Don Harper 2023-10-31 07:35:41 -05:00
parent f7b59f3763
commit d8c567f464

46
home/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" ];
};
};
}