From 7ff713bac1a9ed4a74f153a07e0f2dbc8dcf6bcf Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 12 Apr 2022 00:33:58 +0200 Subject: [PATCH] Set up IMAP IDLE fo disroot --- modules/periodic.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/periodic.nix b/modules/periodic.nix index a638239..7ba4cba 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -82,6 +82,22 @@ in { after = [ "network.target" ]; }; + systemd.user.services.goimapnotify-disroot = { + description = "Sync disroot mail using IMAP IDLE"; + wantedBy = [ "default.target" ]; + path = [ goimapnotify pass-wayland isync-oauth2 notmuch ]; + script = '' + ${pkgs.goimapnotify}/bin/goimapnotify -conf /home/coolneng/.config/goimapnotify/disroot.conf + ''; + serviceConfig = { + ExecStartPre = "/home/coolneng/.local/share/scripts/mail-sync disroot"; + Type = "simple"; + Restart = "always"; + RestartSec = 20; + }; + after = [ "network.target" ]; + }; + # Garbage collect git repositories on a monthly basis systemd.user.services.git-gc = { description = "Garbage collect git repositories";