{ pkgs, ... }: let homedir = builtins.getEnv "HOME"; in { accounts = { email = { maildirBasePath = "${homedir}/Mail"; accounts = { "ben@bsima.me" = { primary = true; realName = "Ben Sima"; address = "ben@bsima.me"; alot.sendMailCommand = "${homedir}/bin/sendmail"; folders = { inbox = "INBOX"; }; imap = { host = "mail.bsima.me"; port = 993; }; smtp = { host = "mail.bsima.me"; port = 587; }; userName = "ben@bsima.me"; mbsync = { enable = true; create = "both"; expunge = "none"; }; notmuch.enable = true; msmtp.enable = true; passwordCommand = "pass bnet/helium/mail/ben"; }; "ben@simatime.com" = { realName = "Ben Sima"; address = "ben@simatime.com"; userName = "ben@simatime.com"; imap = { host = "mail.simatime.com"; port = 993; }; smtp = { host = "mail.simatime.com"; port = 587; }; mbsync = { enable = true; create = "both"; expunge = "none"; }; notmuch.enable = true; passwordCommand = "pass simatime/mail/ben"; msmtp.enable = true; }; #"ben.sima@heroprojects.io" = { # flavor = "gmail.com"; # realName = "Ben Sima"; # address = "ben.sima@heroprojects.io"; # userName = "ben.sima@heroprojects.io"; # mbsync = { # enable = true; # create = "both"; # expunge = "none"; # }; # notmuch.enable = true; # msmtp.enable = true; # passwordCommand = "pass work/hero/gmail"; #}; }; }; }; programs = { notmuch = { enable = true; new.tags = [ "new" ]; hooks = { preNew = '' msmtp-queue -r mbsync --all ''; postNew = '' afew -tnv afew -mnv echo "re-tagging inbox.." afew -t tag:inbox ''; }; extraConfig = { search = { exclude_tags = "deleted;spam;"; }; }; }; afew = { enable = true; extraConfig = builtins.readFile ./afew.ini; }; alot = { enable = true; extraConfig = '' theme = solarized_light ''; }; mbsync = { enable = true; }; msmtp = { enable = false; }; }; }