diff --git a/users/rouven/modules/accounts/default.nix b/users/rouven/modules/accounts/default.nix index 7144d9a..d64e048 100644 --- a/users/rouven/modules/accounts/default.nix +++ b/users/rouven/modules/accounts/default.nix @@ -3,21 +3,20 @@ let gpg-default-key = "116987A8DD3F78FF8601BF4DB95E8FE6B11C4D09"; in { - programs.thunderbird = { - enable = true; - profiles = { - default = { - withExternalGnupg = true; - isDefault = true; - }; - }; - }; programs = { neomutt = { enable = true; sidebar.enable = true; + checkStatsInterval = 30; extraConfig = '' + bind pager noop + bind index,pager \Cp sidebar-prev + # Move the highlight to the next mailbox + bind index,pager \Cn sidebar-next + # Open the highlighted mailbox + bind index,pager sidebar-open source ${./dracula.muttrc} + source ${./powerline.neomuttrc} ''; }; mbsync.enable = true; @@ -42,7 +41,7 @@ in port = 587; tls.useStartTls = true; }; - thunderbird.enable = true; + msmtp.enable = true; mbsync = { enable = true; create = "maildir"; @@ -89,8 +88,56 @@ in neomutt = { enable = true; mailboxName = "--TU Dresden-------"; - extraMailboxes = [ "Sent" "Opal" "Trash" "Junk-E-Mail" "Drafts" ]; + # mbsync can't handle umlauts, rap + extraMailboxes = [ "Gesendete Elemente" "Opal" "Gel&APY-schte Elemente" "Junk-E-Mail" "Entw&APw-rfe" ]; + extraConfig = '' + unset postponed + unset trash + unset record + set postponed='+Entw&APw-rfe' + set trash='+Gel&APY-schte Elemente' + set record='+Gesendete Elemente' + ''; }; }; + "gmail" = rec { + address = "seifertrouven@gmail.com"; + realName = "Rouven Seifert"; + userName = address; + passwordCommand = "pass mail/google"; + imap = { + host = "imap.gmail.com"; + port = 993; + }; + smtp = { + host = "smtp.gmail.com"; + port = 465; + }; + mbsync = { + enable = true; + create = "maildir"; + extraConfig = { + account = { + AuthMechs = "Login"; + }; + }; + subFolders = "Verbatim"; + }; + msmtp.enable = true; + neomutt = { + enable = true; + mailboxName = "--gmail------------"; + extraMailboxes = [ "[Gmail]/Gesendet" "[Gmail]/Papierkorb" "[Gmail]/Spam" "[Gmail]/Entw&APw-rfe" ]; + extraConfig = '' + unset postponed + unset trash + unset record + set postponed='+[Gmail]/Entw&APw-rfe' + set trash='+[Gmail]/Papierkorb' + set record='+[Gmail/Gesendet]' + ''; + }; + }; + }; } diff --git a/users/rouven/modules/accounts/dracula.muttrc b/users/rouven/modules/accounts/dracula.muttrc index aa77d0f..70e6035 100644 --- a/users/rouven/modules/accounts/dracula.muttrc +++ b/users/rouven/modules/accounts/dracula.muttrc @@ -40,3 +40,12 @@ color quoted2 color84 default color quoted3 color215 default color quoted4 color212 default color signature color212 default + +color sidebar_indicator cyan black +color sidebar_highlight white color8 +color sidebar_divider color8 black +color sidebar_flagged red black +color sidebar_new green black +color sidebar_ordinary color245 default +color sidebar_spool_file color207 default +color sidebar_unread color136 default diff --git a/users/rouven/modules/accounts/powerline.neomuttrc b/users/rouven/modules/accounts/powerline.neomuttrc new file mode 100644 index 0000000..9ffea48 --- /dev/null +++ b/users/rouven/modules/accounts/powerline.neomuttrc @@ -0,0 +1,46 @@ +# ---------------------------------------------------------------------------- +# Powerline / nerdfont +# This is a bit "hackish" due to neomutt limitations +# +# Author: Sheoak +# ---------------------------------------------------------------------------- +set index_format=" %zs %zc %zt %{!%d %b} . %-28.28L %?M?(%1M)& ? %?X?&·? %s" +set pager_format=" %n %zc  %T %s%*  %{!%d %b · %H:%M} %?X?  %X ? %P  " +set status_format = " %f%?r? %r?   %m %?n?  %n ?  %?d?  %d ?%?t?  %t ?%?F?  %F? %> %?p?  %p ?" +set vfolder_format = " %N %?n?%3n& ? %8m  · %f" +set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M" + +# no addressed to me, to me, group, cc, sent by me, mailing list +set to_chars="➜" +# unchanged mailbox, changed, read only, attach mode +set status_chars = " " +ifdef crypt_chars set crypt_chars = " " +set flag_chars = " " + +set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted" +tag-transforms "replied" "↻ " \ + "encrytpted" "" \ + "signed" "" \ + "attachment" "" \ + +# The formats must start with 'G' and the entire sequence is case sensitive. +tag-formats "replied" "GR" \ + "encrypted" "GE" \ + "signed" "GS" \ + "attachment" "GA" \ + +color status white black +# powerline status bar hack +color status green black '' +color status yellow black '' +color status red black '' +color status brightblack blue '(.*)' 1 +color status blue black '.*()' 1 +color status black blue '\s* [0-9]+\s*' +color status blue black '().*$' 1 +color status yellow black '()\s*\s*[0-9]+\s*' 1 +color status black yellow '\s*\s*[0-9]+\s*' +color status blue yellow '() ([0-9]+%|all|end) \s*' 1 +color status black blue ' ([0-9]+%|all|end) \s*' +color status yellow black '()\s*' 1 +color status default black ''