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
{ lib, pkgs, config, ... }: {
backup.all.restic.dirs = [ config.users.users.mailUser.home ];
users.users.mailUser = {

View file

@ -401,10 +401,12 @@ in {
set nm_record_tags = "-inbox me archive"
set virtual_spoolfile=yes # enable virtual folders
set sendmail=${pkgs.writers.writeBash "msmtp" ''
set sendmail=${
pkgs.writers.writeBash "msmtp" ''
${pkgs.coreutils}/bin/tee >(${pkgs.notmuch}/bin/notmuch insert --create-folder +sent) | \
${pkgs.msmtp}/bin/msmtp "$@"
''}
''
}
set from="contact@ingolf-wagner.de"
#alternates ^.*@ingolf-wagner\.de$ ^.*@.*\.r$
@ -414,7 +416,8 @@ in {
set sort=threads
set index_format="${pkgs.writers.writeDash "mutt-index" ''
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
@ -422,7 +425,8 @@ in {
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 |"
''
} %r |"
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"
@ -490,9 +494,11 @@ in {
bind pager t noop
bind index T noop
bind pager T noop
macro index T "<pipe-message>${pkgs.writers.writeDash "mutt2task" ''
macro index T "<pipe-message>${
pkgs.writers.writeDash "mutt2task" ''
${pkgs.taskwarrior}/bin/task add +email E-mail: $( ${pkgs.gnugrep}/bin/grep 'Subject' $* | awk -F: '{print $2}' )
''}<enter>"
''
}<enter>"
# top index bar in email view
set pager_index_lines=7
@ -538,6 +544,16 @@ in {
${mailSend}/bin/mail-send
${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
];
}