blob: 66343a0c362562945c31e43682ecf59fe7d86452 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{ pkgs, options, ... }:
let
inherit (pkgs.pkgsConfigured) isync;
in {
config =
if options.environment ? "darwinConfig" then
{
launchd.user.agents.isync = {
serviceConfig.ProgramArguments = [ "${isync}/bin/mbsync" "Periodic" ];
serviceConfig.StartInterval = 300;
serviceConfig.RunAtLoad = true;
};
}
else
{
systemd.user.services.isync = {
serviceConfig = {
Type = "oneshot";
ExecStart = ''
${isync}/bin/mbsync Periodic
'';
};
};
systemd.user.timers.isync = {
timerConfig = {
Unit = "isync.service";
OnCalendar = "*:0/5";
Persistent = "true";
};
wantedBy = [ "default.target" ];
};
};
}
|