diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-19 01:40:50 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-19 01:40:50 +0530 |
| commit | baae94abb6a9a03914216f0f373b7b0f6b0207bd (patch) | |
| tree | 34f0b938f0b34b0c3723ed929246f71f9a2d396e /modules/communication/neomutt/default.nix | |
| parent | 6b0161b2639bb49e270754e90f4f8a47311c5198 (diff) | |
| download | home-manager-config-baae94abb6a9a03914216f0f373b7b0f6b0207bd.tar.gz home-manager-config-baae94abb6a9a03914216f0f373b7b0f6b0207bd.zip | |
chore: removed all raw string configurations options in favor of files
Moved all configurations which were previously raw strings chunks, for
options that the home-manager options didn't provide, into files for
that specific configuration and reading there contents instead (with
string replacement for passing information from the rest of the
configuration).
Diffstat (limited to 'modules/communication/neomutt/default.nix')
| -rw-r--r-- | modules/communication/neomutt/default.nix | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/modules/communication/neomutt/default.nix b/modules/communication/neomutt/default.nix index 84e6c61..b9f22e0 100644 --- a/modules/communication/neomutt/default.nix +++ b/modules/communication/neomutt/default.nix @@ -79,14 +79,9 @@ in xdg.mimeApps.defaultApplications = { "x-scheme-handler/mailto" = "neomutt.desktop"; }; - xdg.configFile."neomutt/mailcap".text = '' - text/html; ${lib.getExe config.web.chawan.package} '%s'; nametemplate=%s.html - image/*; xdg-open '%s' & - application/pdf; xdg-open '%s'; nametemplate=%s.pdf - video/*; xdg-open '%s' & - audio/*; xdg-open '%s' & - application/*; xdg-open '%s' & - ''; + xdg.configFile."neomutt/mailcap".text = + builtins.replaceStrings [ "@@HTML_VIEWER@@" ] [ (lib.getExe config.web.chawan.package) ] + (builtins.readFile ./mailcap); programs.neomutt = { enable = true; package = pkgs.symlinkJoin { @@ -107,16 +102,9 @@ in vimKeys = false; unmailboxes = true; checkStatsInterval = 20; - extraConfig = '' - # Read messages in Neovim. `-` makes Neovim read the message from - # stdin and -R prevents accidental edits to message content. - set pager = "${lib.getExe config.development.nixvim.package} -R -n +'setlocal nolist | silent! 1,2g/^$/delete _ | nohlsearch | setlocal nomodified nomodifiable' -" - # Return directly to the index when Neovim exits and do not prepend - # NeoMutt’s pager status line to the message passed to Neovim. - set noprompt_after - set pager_format = "" - '' - + builtins.readFile ./.neomuttrc; + extraConfig = + builtins.replaceStrings [ "@@PAGER@@" ] [ (lib.getExe config.development.nixvim.package) ] + (builtins.readFile ./.neomuttrc); }; }; } |
