imapnotify. aerc settings. other misc mail stuff

master
Dustin Swan 5 days ago
parent 0b5f35d274
commit 8cf5f022a5
Signed by: dustinswan
GPG Key ID: 30D46587E2100467

@ -101,7 +101,7 @@ in
services.mbsync = { services.mbsync = {
enable = true; enable = true;
frequency = "*:0/5"; # every 5 minutes frequency = "*:0/15"; # every 15 minutes
}; };
services.vdirsyncer = { services.vdirsyncer = {

@ -20,13 +20,23 @@
''; '';
}; };
services.imapnotify.enable = true;
# Add PATH to imapnotify service so it can find pass
launchd.agents.imapnotify-FastMail.config.EnvironmentVariables = {
PATH = "${pkgs.pass}/bin:${pkgs.gnupg}/bin:/usr/bin:/bin";
};
launchd.agents.mbsync = { launchd.agents.mbsync = {
enable = true; enable = true;
config = { config = {
ProgramArguments = [ "${pkgs.isync}/bin/mbsync" "-a" ]; ProgramArguments = [ "${pkgs.isync}/bin/mbsync" "-a" ];
StartInterval = 300; # every 5 minutes StartInterval = 900; # every 15 minutes
StandardOutPath = "/tmp/mbsync.log"; StandardOutPath = "/tmp/mbsync.log";
StandardErrorPath = "/tmp/mbsync.err"; StandardErrorPath = "/tmp/mbsync.err";
EnvironmentVariables = {
PATH = "${pkgs.pass}/bin:${pkgs.gnupg}/bin:/usr/bin:/bin";
};
}; };
}; };
@ -37,6 +47,9 @@
StartInterval = 900; # every 15 minutes StartInterval = 900; # every 15 minutes
StandardOutPath = "/tmp/vdirsyncer.log"; StandardOutPath = "/tmp/vdirsyncer.log";
StandardErrorPath = "/tmp/vdirsyncer.err"; StandardErrorPath = "/tmp/vdirsyncer.err";
EnvironmentVariables = {
PATH = "${pkgs.pass}/bin:${pkgs.gnupg}/bin:/usr/bin:/bin";
};
}; };
}; };

@ -1,4 +1,4 @@
{ ... }: { pkgs, ... }:
{ {
programs.mbsync.enable = true; programs.mbsync.enable = true;
@ -6,9 +6,32 @@
programs.himalaya.enable = true; programs.himalaya.enable = true;
programs.vdirsyncer.enable = true; programs.vdirsyncer.enable = true;
programs.khard.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 = { programs.aerc = {
enable = true; 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 = { accounts.email = {
@ -39,6 +62,16 @@
create = "maildir"; create = "maildir";
expunge = "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; msmtp.enable = true;
aerc.enable = true; aerc.enable = true;
himalaya = { himalaya = {

Loading…
Cancel
Save