diff --git a/system/desktop/mail-stuff.nix b/system/desktop/mail-stuff.nix index 62c309c..3cd5f9b 100644 --- a/system/desktop/mail-stuff.nix +++ b/system/desktop/mail-stuff.nix @@ -178,7 +178,14 @@ in { text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput; ''; - home-manager.users.mainUser.home.file.".muttrc".text = '' + home-manager.users.mainUser.home.file.".muttrc".text = let + + index_format = pkgs.writers.writeDash "index_format" '' + # http://www.mutt.org/doc/manual/#formatstrings + recipent="$(echo $1 | sed 's/[^,]*<\([^>]*\)[^,]*/ \1/g')" + echo "%4C %Z %?GI?%GI& ? %[%y-%m-%d %H:%M] %-20.20a %?M?(%3M)& ? %s %> $recipent %?g?%g?%" + ''; + in '' # gpg set crypt_use_gpgme=yes set crypt_autosign=yes @@ -220,17 +227,7 @@ in { set sort=threads - set index_format="${ - pkgs.writers.writeDash "mutt-index" '' - # http://www.mutt.org/doc/manual/#formatstrings - recipent="$(echo $1 | sed 's/[^,]*<\([^>]*\)[^,]*/ \1/g')" - # output to mutt - # V - echo "%4C %Z %?GI?%GI& ? %[%y-%m-%d %H:%M] %-20.20a %?M?(%3M)& ? %s %> $recipent %?g?%g?%" - # args to mutt-index dash script - # V - '' - } %r |" + set index_format="${index_format} %r |" virtual-mailboxes "INBOX" "notmuch://?query=(tag:inbox or (tag:sent and not tag:archive)) AND NOT tag:discourse AND NOT tag:muted" virtual-mailboxes "Unread" "notmuch://?query=(tag:unread AND NOT tag:muted)"