From f41600d28dff11897dd92b6f85e15ceeb93fe6e3 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 5 Aug 2019 14:45:15 +0200 Subject: satoshipad: run mbsync on timer --- satoshipad.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/satoshipad.nix b/satoshipad.nix index 25aaf284..5ecb4481 100644 --- a/satoshipad.nix +++ b/satoshipad.nix @@ -50,4 +50,22 @@ virtualisation.docker.autoPrune.dates = "Mon, 13:00"; system.stateVersion = "18.03"; + + systemd.user.services.mbsync = { + description = "Mailbox synchronisation"; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.isync}/bin/mbsync -Va"; + ExecStartPost = "${pkgs.unstable.emacs}/bin/emacsclient -e (mu4e-update-index)"; + }; + }; + + systemd.user.timers.mbsync = { + description = "Mailbox synchronisation timer"; + wantedBy = [ "default.target" ]; + timerConfig = { + OnBootSec = "2m"; + OnUnitActiveSec = "10m"; + }; + }; } -- cgit 1.4.1