This commit is contained in:
Ingolf Wagner 2020-01-17 22:38:16 +13:00
parent 004820f508
commit efa76e9471
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 33 additions and 18 deletions

View file

@ -1,7 +1,6 @@
# fetches mails for me # fetches mails for me
{ lib, pkgs, config, ... }: { { lib, pkgs, config, ... }: {
backup.all.restic.dirs = [ config.users.users.mailUser.home ]; backup.all.restic.dirs = [ config.users.users.mailUser.home ];
users.users.mailUser = { users.users.mailUser = {

View file

@ -401,10 +401,12 @@ in {
set nm_record_tags = "-inbox me archive" set nm_record_tags = "-inbox me archive"
set virtual_spoolfile=yes # enable virtual folders set virtual_spoolfile=yes # enable virtual folders
set sendmail=${pkgs.writers.writeBash "msmtp" '' set sendmail=${
${pkgs.coreutils}/bin/tee >(${pkgs.notmuch}/bin/notmuch insert --create-folder +sent) | \ pkgs.writers.writeBash "msmtp" ''
${pkgs.msmtp}/bin/msmtp "$@" ${pkgs.coreutils}/bin/tee >(${pkgs.notmuch}/bin/notmuch insert --create-folder +sent) | \
''} ${pkgs.msmtp}/bin/msmtp "$@"
''
}
set from="contact@ingolf-wagner.de" set from="contact@ingolf-wagner.de"
#alternates ^.*@ingolf-wagner\.de$ ^.*@.*\.r$ #alternates ^.*@ingolf-wagner\.de$ ^.*@.*\.r$
@ -414,15 +416,17 @@ in {
set sort=threads set sort=threads
set index_format="${pkgs.writers.writeDash "mutt-index" '' set index_format="${
# http://www.mutt.org/doc/manual/#formatstrings pkgs.writers.writeDash "mutt-index" ''
recipent="$(echo $1 | sed 's/[^,]*<\([^>]*\)[^,]*/ \1/g')" # http://www.mutt.org/doc/manual/#formatstrings
# output to mutt recipent="$(echo $1 | sed 's/[^,]*<\([^>]*\)[^,]*/ \1/g')"
# V # output to mutt
echo "%4C %Z %?GI?%GI& ? %[%y-%m-%d %H:%M] %-20.20a %?M?(%3M)& ? %s %> $recipent %?g?%g?%" # V
# args to mutt-index dash script echo "%4C %Z %?GI?%GI& ? %[%y-%m-%d %H:%M] %-20.20a %?M?(%3M)& ? %s %> $recipent %?g?%g?%"
# V # args to mutt-index dash script
''} %r |" # V
''
} %r |"
virtual-mailboxes "INBOX" "notmuch://?query=(tag:inbox or (tag:sent and not tag:archive)) AND NOT tag:discourse" virtual-mailboxes "INBOX" "notmuch://?query=(tag:inbox or (tag:sent and not tag:archive)) AND NOT tag:discourse"
virtual-mailboxes "Unread" "notmuch://?query=tag:unread" virtual-mailboxes "Unread" "notmuch://?query=tag:unread"
@ -490,9 +494,11 @@ in {
bind pager t noop bind pager t noop
bind index T noop bind index T noop
bind pager T noop bind pager T noop
macro index T "<pipe-message>${pkgs.writers.writeDash "mutt2task" '' macro index T "<pipe-message>${
${pkgs.taskwarrior}/bin/task add +email E-mail: $( ${pkgs.gnugrep}/bin/grep 'Subject' $* | awk -F: '{print $2}' ) pkgs.writers.writeDash "mutt2task" ''
''}<enter>" ${pkgs.taskwarrior}/bin/task add +email E-mail: $( ${pkgs.gnugrep}/bin/grep 'Subject' $* | awk -F: '{print $2}' )
''
}<enter>"
# top index bar in email view # top index bar in email view
set pager_index_lines=7 set pager_index_lines=7
@ -538,6 +544,16 @@ in {
${mailSend}/bin/mail-send ${mailSend}/bin/mail-send
${mailSync}/bin/mail-sync ${mailSync}/bin/mail-sync
''; '';
in [ pkgs.notmuch pkgs.alot pkgs.muchsync mail mailSync mailView mailSend pkgs.neomutt mutt ]; in [
pkgs.notmuch
pkgs.alot
pkgs.muchsync
mail
mailSync
mailView
mailSend
pkgs.neomutt
mutt
];
} }