nixos-config/users/simon/modules/mail/notmuch.nix
Simon Bruder 2787c28a3d
mail: Add notmuch
Aerc’s notmuch support is not yet very mature, so it needs a hacky
workaround to work somewhat well.
2022-07-08 11:51:03 +02:00

22 lines
646 B
Nix

{
programs.mbsync.enable = true;
# TODO: remove when copy-to is implemented in aerc for notmuch
programs.msmtp.enable = true;
programs.notmuch = {
enable = true;
hooks = {
preNew = ''
mbsync --all
'';
postNew = ''
notmuch tag +sent -inbox -unread "folder:personal/Sent"
notmuch tag +ebay "to:ebay@sbruder.de"
notmuch tag +kleinanzeigen "to:ebay-kleinanzeigen@sbruder.de"
notmuch tag +git "from:{.*@github.com or .*@gitlab.com or (no-reply+)?gitea@sbruder.de} or subject:[PATCH]"
notmuch tag +newsletter "subject:newsletter and tag:unread"
'';
};
};
}