From dccd1a74073abe73e063115a95d6dd6eed38f7b9 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Fri, 12 May 2023 18:24:38 +0200 Subject: [PATCH] mbsync wrapper to call notmuch after syncing --- home/mail/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/home/mail/default.nix b/home/mail/default.nix index 6a3930c..bc7f746 100644 --- a/home/mail/default.nix +++ b/home/mail/default.nix @@ -98,11 +98,16 @@ in { extraBinds = builtins.readFile ./aerc/binds.conf; }; services.mbsync.enable = true; - programs.mbsync.enable = true; + programs.mbsync = { + enable = true; + package = pkgs.writeShellScriptBin "mbsync" '' + ${pkgs.isync}/bin/mbsync $@ + ${pkgs.notmuch}/bin/notmuch new + ''; + }; services.imapnotify.enable = true; programs.notmuch = { enable = true; - hooks.preNew = "mbsync --all"; }; programs.neomutt = {