imapnotify. aerc settings. other misc mail stuff

This commit is contained in:
2026-01-14 10:45:25 -07:00
parent 0b5f35d274
commit 8cf5f022a5
3 changed files with 50 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
{ ... }:
{ pkgs, ... }:
{
programs.mbsync.enable = true;
@@ -6,9 +6,32 @@
programs.himalaya.enable = true;
programs.vdirsyncer.enable = true;
programs.khard.enable = true;
programs.notmuch = {
enable = true;
new = {
tags = [ "new" ];
};
hooks = {
preNew = "mbsync -a";
};
};
accounts.email.accounts.FastMail.notmuch.enable = true;
programs.aerc = {
enable = true;
extraConfig.general.unsafe-accounts-conf = true;
extraConfig = {
general.unsafe-accounts-conf = true;
ui = {
mouse-enabled = true;
threading-enabled = true;
};
compose = {
address-book-cmd = "khard email --parsable '%s'";
};
filters = {
"text/html" = "${pkgs.w3m}/bin/w3m -T text/html -cols $(tput cols) -dump -o display_image=false -o display_link_number=true";
};
};
};
accounts.email = {
@@ -39,6 +62,16 @@
create = "maildir";
expunge = "maildir";
};
imapnotify = {
enable = true;
boxes = [ "INBOX" ];
onNotify = "${pkgs.isync}/bin/mbsync FastMail:INBOX";
onNotifyPost = let
notifyCmd = if pkgs.stdenv.isDarwin
then "${pkgs.terminal-notifier}/bin/terminal-notifier -title 'New Mail' -message 'FastMail INBOX' -sound default"
else "${pkgs.libnotify}/bin/notify-send 'New Mail' 'FastMail INBOX'";
in notifyCmd;
};
msmtp.enable = true;
aerc.enable = true;
himalaya = {