diff options
Diffstat (limited to 'modules/desktop/apps/mutt-wizard.nix')
-rw-r--r-- | modules/desktop/apps/mutt-wizard.nix | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/modules/desktop/apps/mutt-wizard.nix b/modules/desktop/apps/mutt-wizard.nix index 3b8a5db..da7b779 100644 --- a/modules/desktop/apps/mutt-wizard.nix +++ b/modules/desktop/apps/mutt-wizard.nix @@ -21,6 +21,26 @@ in pkgs.isync pkgs.lynx pkgs.mutt-wizard - ]; + ]; + + systemd.timers."auto-mailsync" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "10m"; + OnUnitActiveSec = "10m"; + Unit = "auto-mailsync.service"; + }; + }; + + systemd.services."auto-mailsync" = { + script = '' + set -eu + /run/current-system/sw/bin/bash -l -c '${pkgs.mutt-wizard}/bin/mailsync -Y' + ''; + serviceConfig = { + Type = "oneshot"; + User = "jon"; + }; + }; }; } |