nixos-config/users/simon/modules/mail/notmuch.nix

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"
'';
};
};
}