{ pkgs, osConfig, lib, ... }: { programs = { aerc = { enable = true; extraConfig = { ui = { sort = "-r arrival"; threading-enabled = true; fuzzy-complete = true; }; general = { default-save-path = "~/Downloads"; log-file = "~/.aerc.log"; unsafe-accounts-conf = true; }; compose = { address-book-cmd = "notmuch address \"%s\""; }; filters = { "text/plain" = "colorize"; "text/calendar" = "calendar"; "text/html" = "html | colorize"; }; }; }; msmtp = { enable = true; }; mbsync = { enable = true; }; afew = { enable = true; }; notmuch = { enable = true; new.tags = ["new"]; hooks = { postNew = '' afew --tag --new ''; preNew = '' mbsync -a ''; }; }; }; accounts = { email = { accounts.personal = { primary = true; address = "me@michaelthomson.dev"; realName = "Michael Thomson"; userName = "me@michaelthomson.dev"; # passwordCommand = "rbw get --folder email me@michaelthomson.dev"; passwordCommand = "cat ~/auth/email"; mbsync = { enable = true; create = "both"; expunge = "both"; }; imap = { host = "mail.michaelthomson.dev"; port = 993; tls = { enable = true; }; }; msmtp = { enable = true; }; smtp = { host = "mail.michaelthomson.dev"; port = 465; tls = { enable = true; }; }; notmuch = { enable = true; }; aerc = { enable = true; # extraAccounts = { # source = "maildir://~/Maildir/work"; # }; }; }; }; }; }