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";