diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-06-28 00:39:56 +0200 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-06-28 00:39:56 +0200 |
| commit | 3ff163f82355aba1cbd60332309209bbe5cd92c9 (patch) | |
| tree | 81cf22c6a186257e997331bba076c425704fcd93 /email/mailsync.nix | |
| parent | f4effc7665bf280c8587c6c65e4ee769d0244363 (diff) | |
email update
Diffstat (limited to 'email/mailsync.nix')
| -rw-r--r-- | email/mailsync.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/email/mailsync.nix b/email/mailsync.nix new file mode 100644 index 0000000..dbf5d7f --- /dev/null +++ b/email/mailsync.nix @@ -0,0 +1,35 @@ +{ + flake, + config, + pkgs, + home-manager, + ... +}: { + programs.mbsync = { + enable = true; + }; + systemd.user.timers.mailsync = { + Unit = { + Description = "daemon that syncs mail"; + }; + Timer = { + OnBootSec = "5m"; + OnUnitActiveSec = "5m"; + Unit = "mailsync.service"; + }; + Install = { + WantedBy = [ "timers.target" ]; + }; + }; + systemd.user.services.mailsync = { + Unit = { + Description = "daemon that syncs mail"; + }; + Service = { + Type = "oneshot"; + RemainAfterExit = "no"; + ExecSearchPath = "${config.home.profileDirectory}/bin:/run/current-system/sw/bin"; + ExecStart = "mailsync"; + }; + }; +} |
