From b7fdbe1804e669e67799b4f1bd24d17ad6efcd6f Mon Sep 17 00:00:00 2001 From: Anish L Date: Tue, 22 Mar 2022 22:06:14 +1000 Subject: [PATCH] mbsync works! mailcap for neomutt --- users/profiles/email/default.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/users/profiles/email/default.nix b/users/profiles/email/default.nix index 33e73491..935c8507 100644 --- a/users/profiles/email/default.nix +++ b/users/profiles/email/default.nix @@ -7,22 +7,25 @@ services.mbsync = { enable = true; frequency = "*:0/30"; - postExec = "${pkgs.notmuch}/bin/notmuch new"; + #postExec = "${pkgs.notmuch}/bin/notmuch new"; }; programs.mbsync.enable = true; programs.msmtp.enable = true; programs.notmuch = { enable = true; - hooks = { - preNew = "mbsync --all"; - }; }; + home.file.".mailcap".text = '' + text/html; firefox %s + application/pdf; zathura %s + image/png; feh %s + image/jpeg; feh %s + ''; programs.neomutt = { enable = true; extraConfig = '' # Shamelessly Stolen from https://gideonwolfe.com/posts/workflow/neomutt/intro/ # set editor to neovim - set editor = "nvim" + set editor = "nvim +':set textwidth=0'" #set virtual_spoolfile=yes set folder="~/Mail/" @@ -46,7 +49,7 @@ # Set preffered view modes auto_view text/html text/calendar application/ics # view html automatically - # alternative_order text/html text/plain text/enriched text/* + alternative_order text/plain text/enriched text/html text/* # main options #set envelope_from @@ -106,7 +109,6 @@ set tilde unset markers - #set mailcap_path = ~/.config/neomutt/mailcap #set header_cache = "~/.cache/mutt" #set message_cachedir = "~/.cache/mutt" @@ -265,8 +267,8 @@ onNotify = "${pkgs.isync}/bin/mbsync anish && ${pkgs.notmuch}/bin/notmuch index"; onNotifyPost = { mail = "${pkgs.libnotify}/bin/notify-send -a mail 'email: new in %s'"; - update = "${pkgs.libnotify}/bin/notify-send -a mail 'email: update %s'"; - expunge = "${pkgs.libnotify}/bin/notify-send -a mail 'email: expunge %s'"; + #update = "${pkgs.libnotify}/bin/notify-send -a mail 'email: update %s'"; + #expunge = "${pkgs.libnotify}/bin/notify-send -a mail 'email: expunge %s'"; }; }; msmtp.enable = true; @@ -279,7 +281,7 @@ ''; showSignature = "append"; }; - passwordCommand = "cat /run/agenix/fastmail"; + passwordCommand = "${pkgs.coreutils}/bin/cat /run/agenix/fastmail"; smtp = { host = "fastmail.com"; };