From efa76e94710e47f09e02ff2ccfb31854ec6ce4e6 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 17 Jan 2020 22:38:16 +1300 Subject: [PATCH] reformat --- configs/workhorse/mail-fetcher.nix | 1 - system/desktop/mail-stuff.nix | 50 ++++++++++++++++++++---------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/configs/workhorse/mail-fetcher.nix b/configs/workhorse/mail-fetcher.nix index 86da1fb..7aabce1 100644 --- a/configs/workhorse/mail-fetcher.nix +++ b/configs/workhorse/mail-fetcher.nix @@ -1,7 +1,6 @@ # fetches mails for me { lib, pkgs, config, ... }: { - backup.all.restic.dirs = [ config.users.users.mailUser.home ]; users.users.mailUser = { diff --git a/system/desktop/mail-stuff.nix b/system/desktop/mail-stuff.nix index ae1b9c0..c50188e 100644 --- a/system/desktop/mail-stuff.nix +++ b/system/desktop/mail-stuff.nix @@ -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" '' - ${pkgs.coreutils}/bin/tee >(${pkgs.notmuch}/bin/notmuch insert --create-folder +sent) | \ - ${pkgs.msmtp}/bin/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,15 +416,17 @@ 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="${ + 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 |" 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 "${pkgs.writers.writeDash "mutt2task" '' - ${pkgs.taskwarrior}/bin/task add +email E-mail: $( ${pkgs.gnugrep}/bin/grep 'Subject' $* | awk -F: '{print $2}' ) - ''}" + macro index T "${ + pkgs.writers.writeDash "mutt2task" '' + ${pkgs.taskwarrior}/bin/task add +email E-mail: $( ${pkgs.gnugrep}/bin/grep 'Subject' $* | awk -F: '{print $2}' ) + '' + }" # 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 + ]; }