diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-26 12:35:27 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-26 12:35:27 +0530 |
| commit | 65e1ce5e82c0d272d91ca4213b0d27548768c2e7 (patch) | |
| tree | 1ed2d17a5d6660dd4da7a370137a983b61dba03e | |
| parent | d8d4727e9b6417948f21376e8293c755fa10c0f1 (diff) | |
| download | home-manager-config-65e1ce5e82c0d272d91ca4213b0d27548768c2e7.tar.gz home-manager-config-65e1ce5e82c0d272d91ca4213b0d27548768c2e7.zip | |
feat(neomutt): wrap neomutt with urlscan, remove flag legend
- Add `communication.neomutt.package` option wrapping neomutt with urlscan
- Replace standalone urlscan in home.packages with the wrapped package
- Drop flag_legend.txt and its `gl` macro binding
| -rw-r--r-- | modules/communication/neomutt/default.nix | 25 | ||||
| -rw-r--r-- | modules/communication/neomutt/macros.nix | 8 | ||||
| -rw-r--r-- | modules/communication/neomutt/neomutt.nix | 38 |
3 files changed, 26 insertions, 45 deletions
diff --git a/modules/communication/neomutt/default.nix b/modules/communication/neomutt/default.nix index f12ad02..70f286b 100644 --- a/modules/communication/neomutt/default.nix +++ b/modules/communication/neomutt/default.nix @@ -1,5 +1,10 @@ # Neomutt - Email suite entry point (neomutt + mbsync + notmuch) -{ config, lib, ... }: +{ + config, + lib, + pkgs, + ... +}: { imports = [ ./account @@ -12,6 +17,24 @@ options.communication.neomutt = { enable = lib.mkEnableOption "Email suite (neomutt + mbsync + notmuch)"; + + package = lib.mkOption { + type = lib.types.package; + default = pkgs.symlinkJoin { + name = "neomutt-wrapped"; + paths = with pkgs; [ + neomutt + urlscan + ]; + }; + defaultText = lib.literalExpression '' + pkgs.symlinkJoin { + name = "neomutt-wrapped"; + paths = with pkgs; [ neomutt urlscan ]; + } + ''; + description = "The neomutt package to use, wrapped with urlscan in PATH."; + }; }; config = lib.mkIf config.communication.neomutt.enable { diff --git a/modules/communication/neomutt/macros.nix b/modules/communication/neomutt/macros.nix index 87c05d1..bc18e43 100644 --- a/modules/communication/neomutt/macros.nix +++ b/modules/communication/neomutt/macros.nix @@ -38,14 +38,6 @@ action = "<pipe-entry>${lib.getExe' config.web.w3m.package "w3m"} -cols 100 -T text/html<enter>"; } { - map = [ - "index" - "pager" - ]; - key = "gl"; - action = "<shell-escape>less ~/.config/neomutt/flag_legend.txt<enter>"; - } - { # gF: clear the current limit/filter and show every message again, # the counterpart to gf (interactive limit prompt) in binds.nix map = [ "index" ]; diff --git a/modules/communication/neomutt/neomutt.nix b/modules/communication/neomutt/neomutt.nix index fd97be8..792f90e 100644 --- a/modules/communication/neomutt/neomutt.nix +++ b/modules/communication/neomutt/neomutt.nix @@ -1,10 +1,5 @@ # neomutt - Terminal email client -{ - config, - lib, - pkgs, - ... -}: +{ config, lib, ... }: { config = lib.mkIf config.communication.neomutt.enable { xdg.desktopEntries."neomutt" = { @@ -22,9 +17,6 @@ xdg.mimeApps.defaultApplications = { "x-scheme-handler/mailto" = "neomutt.desktop"; }; - home.packages = with pkgs; [ - urlscan - ]; xdg.configFile."neomutt/mailcap".text = '' text/html; ${lib.getExe' config.web.w3m.package "w3m"} -dump -cols 100 -T text/html '%s'; copiousoutput; nametemplate=%s.html image/*; xdg-open '%s' & @@ -33,35 +25,9 @@ audio/*; xdg-open '%s' & application/*; xdg-open '%s' & ''; - xdg.configFile."neomutt/flag_legend.txt".text = '' - NeoMutt Index Flags - =================== - Message state ($flag_chars) -- unchanged defaults - N New - unread, arrived since you last checked - O Old - unread, but seen in a previous session - D Deleted - marked for deletion (pending expunge) - d Att-del - has attachments marked for deletion - ! Flagged - important (toggle with F) - * Tagged - selected for a bulk operation (toggle with t) - r Replied - you've replied to this message - (blank) - read, nothing else notable - Cryptography ($crypt_chars) - Verified - signed, and the signature checks out - Encrypted - PGP/SMIME encrypted - Signed - PGP/SMIME signed (unverified) - PGP key - message contains a PGP public key - (blank) - no cryptography info - Addressing ($to_chars) - To you only - sent to you and only you - To (with others) - you're in the To: list, among others - Cc only - you're only in the Cc: list - From you - sent by you - Mailing list - sent to a list you're subscribed to - (blank) - not in To/Cc (e.g. Bcc, unlisted) - Press q to close. - ''; programs.neomutt = { enable = true; + package = config.communication.neomutt.package; sidebar.enable = true; sort = "reverse-threads"; vimKeys = true; |
