{ 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"; 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 = false; passwordCommand = "pass bnet/helium/mail/ben"; }; }; }; }; programs = { notmuch = { enable = true; new.tags = [ "unread" "inbox" ]; hooks = { preNew = '' msmtp-queue -r mbsync --all ''; postNew = '' notmuch tag -inbox +haskell -- to:haskell-cafe@haskell.org notmuch tag -inbox +clojure -- to:clojure@googlegroups.com notmuch tag -inbox +ai -- to:scikit-learn@python.org OR to:tensorflow.org notmuch tag -inbox +bitcoin -- to:bitcoin-dev@lists.linuxfoundation.org OR to:bitcoin-discuss@lists.linuxfoundation.org notmuch tag -inbox +diybio -- to:diybio@googlegroups.com notmuch tag -inbox +meetups -- from:meetup.com afew -tn ''; }; extraConfig = { search = { exclude_tags = "deleted;spam;"; }; }; }; afew = { enable = true; extraConfig = builtins.readFile ./afew.ini; }; mbsync = { enable = true; }; msmtp = { enable = false; extraConfig = builtins.readFile ./msmtprc; }; }; }