{ config, pkgs, ... }: { defaultApplications.mail = { cmd = "${pkgs.aerc}/bin/aerc"; desktop = "aerc"; }; home-manager.users.balsoft = { programs.aerc = { enable = true; extraBinds = { global = { "" = ":prev-tab"; "" = ":next-tab"; "?" = ":help keys"; }; messages = { "h" = ":prev-tab"; "l" = ":next-tab"; "j" = ":next"; "" = ":next"; "" = ":next 50%"; "" = ":next 100%"; "" = ":next 100%"; "k" = ":prev"; "" = ":prev"; "" = ":prev 50%"; "" = ":prev 100%"; "" = ":prev 100%"; "g" = ":select 0"; "G" = ":select -1"; "J" = ":next-folder"; "K" = ":prev-folder"; "H" = ":collapse-folder"; "L" = ":expand-folder"; "v" = ":mark -t"; "x" = ":mark -t:next"; "V" = ":mark -v"; "T" = ":toggle-threads"; "" = ":view"; "d" = ":prompt 'Really delete this message?' 'delete-message'"; "D" = ":delete"; "A" = ":archive flat"; "C" = ":compose"; "rr" = ":reply -a"; "rq" = ":reply -aq"; "Rr" = ":reply"; "Rq" = ":reply -q"; "c" = ":cf"; "$" = ":term"; "!" = ":term"; "|" = ":pipe"; "/" = ":search"; "\\" = ":filter"; "n" = ":next-result"; "N" = ":prev-result"; "" = ":clear"; }; "messages:folder=Drafts" = { "" = ":recall"; }; view = { "/" = ":toggle-key-passthrough/"; "q" = ":close"; "O" = ":open"; "S" = ":save"; "|" = ":pipe"; "D" = ":delete"; "A" = ":archive flat"; "" = ":open-link "; "f" = ":forward"; "rr" = ":reply -a"; "rq" = ":reply -aq"; "Rr" = ":reply"; "Rq" = ":reply -q"; "H" = ":toggle-headers"; "" = ":prev-part"; "" = ":next-part"; "J" = ":next"; "K" = ":prev"; }; "view::passthrough" = { "$noinherit" = true; "$ex" = ""; "" = ":toggle-key-passthrough"; }; compose = { "$noinherit" = "true"; "$ex" = ""; "" = ":prev-field"; "" = ":next-field"; "" = ":switch-account -p"; "" = ":switch-account -n"; "" = ":next-field"; "" = ":prev-tab"; "" = ":next-tab"; }; "compose::editor" = { "$noinherit" = "true"; "$ex" = ""; "" = ":prev-field"; "" = ":next-field"; "" = ":prev-tab"; "" = ":next-tab"; }; "compose::review" = { "y" = ":send"; "n" = ":abort"; "p" = ":postpone"; "q" = ":choose -o d discard abort -o p postpone postpone"; "e" = ":edit"; "a" = ":attach"; "d" = ":detach"; }; terminal = { "$noinherit" = "true"; "$ex" = ""; "" = ":prev-tab"; "" = ":next-tab"; }; }; extraConfig = { general.unsafe-accounts-conf = true; ui = { this-day-time-format = ''" 15:04"''; this-year-time-format = "Mon Jan 02 15:04"; timestamp-format = "2006-01-02 15:04"; spinner = "[ ⡿ ],[ ⣟ ],[ ⣯ ],[ ⣷ ],[ ⣾ ],[ ⣽ ],[ ⣻ ],[ ⢿ ]"; border-char-vertical = "┃"; border-char-horizontal = "━"; }; viewer = { always-show-mime = true; }; compose = { no-attachment-warning = "^[^>]*attach(ed|ment)"; }; triggers = { email-received = ''exec notify-send "New email from %n" "%s"''; }; filters = { "text/plain" = "colorize"; "text/html" = "html"; "text/calendar" = "calendar"; "message/delivery-status" = "colorize"; "message/rfc822" = "colorize"; "image/*" = "${pkgs.catimg}/bin/catimg -"; }; }; stylesets = { default = { "border.bg" = 0; "border.fg" = 7; "msglist_default.bg" = 0; "msglist_unread.fg" = 3; "msglist_unread.bold" = "true"; "msglist_marked.bg" = 4; "dirlist_default.bg" = 0; "dirlist_unread.fg" = 3; "*.selected.reverse" = "toggle"; }; }; }; accounts.email.accounts = { Personal = { primary = true; aerc.enable = true; realName = "Alexander Bantyev"; address = "balsoft@balsoft.ru"; imap.host = "balsoft.ru"; smtp.host = "balsoft.ru"; userName = "balsoft@balsoft.ru"; passwordCommand = "pass email/balsoft@balsoft.ru"; }; Work = { aerc.enable = true; address = "alexander.bantyev@tweag.io"; realName = "Alexander Bantyev"; imap.host = "imap.gmail.com"; smtp.host = "smtp.gmail.com"; userName = "alexander.bantyev@tweag.io"; passwordCommand = "pass aerc/alexander.bantyev@tweag.io"; }; }; }; }