summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--satoshipad.nix18
1 files changed, 18 insertions, 0 deletions
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";
+    };
+  };
 }