{ config, pkgs, ... }: { home.file = { ".mailcap".text = "text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput"; }; home.packages = with pkgs; [ mailcap ]; programs.notmuch = { enable = true; extraConfig = { database = { path = "/home/server/Storage/Thomas/Mail"; }; user = { name = "Thomas Avé"; primary_email = "email@thomasave.be"; other_email = "Thomas.Ave@uantwerpen.be;Thomas.Ave@imec.be;"; }; maildir = { synchronize_flags = "true"; }; }; }; programs.aerc = { enable = true; extraBinds = { global = { "" = ":menu -adc 'fzy -l 30' :cf -a"; "" = ":next-tab"; "?" = ":help keys"; "" = ":check-mail"; }; messages = { "q" = ":q"; "" = ":q"; "j" = ":next"; "k" = ":prev"; "" = ":prev"; "g" = ":select 0"; "G" = ":select -1"; "J" = ":next-folder"; "K" = ":prev-folder"; "v" = ":mark -t"; "V" = ":mark -v"; "" = ":read -t"; "T" = ":toggle-threads"; "" = ":view"; "d" = ":prompt 'Really delete this message?' 'delete-message'"; "D" = ":delete"; "a" = ":archive flat"; "A" = ":unmark -a:mark -T:archive flat"; "f" = ":flag -t"; "m" = ":compose"; "rr" = ":reply -a"; "rq" = ":reply -aq"; "Rr" = ":reply"; "Rq" = ":reply -q"; "c" = ":cf"; "$" = ":term"; "!" = ":term"; "|" = ":pipe"; "/" = ":search -a"; "\\" = ":filter -a "; "n" = ":next-result"; "N" = ":prev-result"; "" = ":clear"; "s" = ":split"; "S" = ":vsplit"; "pl" = ":patch list"; "pa" = ":patch apply "; "pd" = ":patch drop "; "pb" = ":patch rebase"; "pt" = ":patch term"; "ps" = ":patch switch "; }; view = { "/" = ":toggle-key-passthrough/"; "q" = ":close"; "O" = ":open"; "o" = ":open"; "S" = ":save"; "|" = ":pipe"; "D" = ":delete"; "A" = ":archive flat"; "" = ":open-link "; "f" = ":flag -t"; "rr" = ":reply -a"; "rq" = ":reply -aq"; "Rr" = ":reply"; "Rq" = ":reply -q"; "H" = ":toggle-headers"; "" = ":prev-part"; "" = ":prev-part"; "" = ":next-part"; "" = ":next-part"; "J" = ":next"; "" = ":next"; "K" = ":prev"; "" = ":prev"; }; "view::passthrough" = { "$noinherit" = "true"; "$ex" = ""; "" = ":toggle-key-passthrough"; }; compose = { "$noinherit" = "true"; "$ex" = ""; "$complete" = ""; "" = ":prev-field"; "" = ":prev-field"; "" = ":next-field"; "" = ":next-field"; "" = ":switch-account -p"; "" = ":switch-account -p"; "" = ":switch-account -n"; "" = ":switch-account -n"; "" = ":next-field"; "" = ":prev-field"; "" = ":prev-tab"; "" = ":prev-tab"; "" = ":next-tab"; "" = ":next-tab"; }; "compose::editor" = { "$noinherit" = "true"; "$ex" = ""; "" = ":prev-field"; "" = ":prev-field"; "" = ":next-field"; "" = ":next-field"; "" = ":prev-tab"; "" = ":prev-tab"; "" = ":next-tab"; "" = ":next-tab"; }; "compose::review" = { "y" = ":send"; "n" = ":abort"; "v" = ":preview"; "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"; "" = ":prev-tab"; "" = ":next-tab"; }; }; extraConfig = { general = { term = "xterm-256color"; unsafe-accounts-conf = true; }; ui = { border-char-vertical = "│"; border-char-horizontal = "─"; styleset-name = "catppuccin-mocha"; timestamp-format = "2006-01-02 15:04"; sidebar-width = 30; mouse-enabled = true; dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}"; dirlist-tree = true; }; viewer = { pager = "${pkgs.neovim}/bin/nvim -u ${config.xdg.configHome}/nvim/aerc.lua"; }; compose = { address-book-cmd = ''notmuch address "%s"''; }; multipart-converters = { "text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html"; }; filters = { "text/plain" = "cat"; "text/calendar" = "${pkgs.gnome.gnome-calendar}/bin/gnome-calendar"; "message/delivery-status" = "cat"; "message/rfc822" = "cat"; "text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html"; "application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh"; }; }; extraAccounts = { Zoho = { outgoing = "smtps://email%40thomasave.be@smtp.zoho.com"; outgoing-cred-cmd = "cat ~/.secrets/Aerc/Zoho.key"; source = "maildir:///home/server/Storage/Thomas/Mail/email@thomasave.be/"; check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh"; check-mail-timeout = "60s"; default = "Inbox"; from = "\"Thomas Avé\" "; cache-headers = true; }; UAntwerpen = { outgoing = "ssh server@192.168.1.2 /home/server/Containers/mbsync/send.sh"; source = "maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@uantwerpen.be"; check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh"; check-mail-timeout = "60s"; default = "Inbox"; from = "\"Thomas Avé\" "; cache-headers = true; }; IMEC = { outgoing = "smtp+insecure://ave57%40imec.be@smtp.thomasave.be:1025"; outgoing-cred-cmd = "cat ~/.secrets/Aerc/IMEC.key"; source = "maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@imec.be/"; check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh"; check-mail-timeout = "60s"; default = "Inbox"; from = "\"Thomas Avé\" "; cache-headers = true; }; NotMuch = { source = "notmuch:///home/server/Storage/Thomas/Mail/"; check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh"; check-mail-timeout = "60s"; from = "\"Thomas Avé\" "; query-map = "${config.xdg.configHome}/aerc/map.conf"; default = "INBOX"; cache-headers = true; }; }; }; home.file."${config.xdg.configHome}/aerc/map.conf".text = "Inbox=tag:inbox and not tag:archived and not tag:deleted"; home.file."${config.xdg.configHome}/aerc/stylesets/catppuccin-mocha".text = '' *.default=true *.normal=true default.fg=#abb2bf default.bg=#11121D *.bg=#11121D error.fg=#f38ba8 warning.fg=#fab387 success.fg=#a6e3a1 tab.fg=#6c7086 tab.bg=#181825 tab.selected.fg=#cdd6f4 tab.selected.bg=#023269 tab.selected.bold=true part*.selected.bg=#023269 border.fg=#023269 border.bold=true msglist_unread.bold=true msglist_unread.fg=#f9e2af msglist_flagged.fg=#e06c75 msglist_flagged.bold=true msglist_result.fg=#89b4fa msglist_result.bold=true msglist_*.selected.bold=true msglist_*.selected.bg=#023269 msglist_*.bg=#11121D dirlist_*.selected.bold=true dirlist_*.selected.bg=#023269 dirlist_*.bg=#181825 statusline_default.fg=#9399b2 statusline_default.bg=#2C3043 statusline_error.bold=true statusline_success.bold=true spinner.bg=#11121D [viewer] header.bg=#181825 url.fg=#89b4fa url.underline=true header.bold=true signature.dim=true diff_meta.bold=true diff_chunk.fg=#89b4fa diff_chunk_func.fg=#89b4fa diff_chunk_func.bold=true diff_add.fg=#a6e3a1 diff_del.fg=#f38ba8 quote_*.fg=#6c7086 quote_1.fg=#9399b2 ''; }