mbsync wrapper to call notmuch after syncing

This commit is contained in:
Valentin Brandl 2023-05-12 18:24:38 +02:00
parent 783b25cea4
commit dccd1a7407
Signed by: vbrandl
GPG Key ID: CAD4DA1A789125F9

View File

@ -98,11 +98,16 @@ in {
extraBinds = builtins.readFile ./aerc/binds.conf; extraBinds = builtins.readFile ./aerc/binds.conf;
}; };
services.mbsync.enable = true; 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; services.imapnotify.enable = true;
programs.notmuch = { programs.notmuch = {
enable = true; enable = true;
hooks.preNew = "mbsync --all";
}; };
programs.neomutt = { programs.neomutt = {