{ pkgs, config, lib, ... }: let keybinds = import ./keybind.nix rec { inherit config lib pkgs; }; colors = import ./colors.nix rec { inherit config lib pkgs; }; in { options.custom.email = with lib; { neomutt = mkEnableOption "Enable NeoMutt"; }; config = lib.mkIf (config.custom.email.enable && config.custom.email.neomutt) { programs.neomutt = { enable = true; vimKeys = false; sort = "threads"; unmailboxes = true; binds = keybinds.binds ++ [ ]; macros = keybinds.macros ++ [ ]; extraConfig = '' set abort_key = "" set editor = "nvim" set edit_headers = yes set sidebar_visible set sidebar_format = "%D%?F? [%F]?%* %?N?%N/?%S" set mail_check_stats # set new_mail_command="notify-send 'New Email' '%n new messages, %u unread.' &" # status bar, date format, finding stuff etc. set status_chars = " *%A" # set status_format = "[ Folder: %f ] [%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]%>─%?p?( %p postponed )?" set status_format = "[ Folder: %D ] [%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]%>─%?p?( %p postponed )?" set date_format = "%d.%m.%Y %H:%M" set uncollapse_jump set sort_re set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" set send_charset = "utf-8:iso-8859-1:us-ascii" set charset = "utf-8" set arrow_cursor = "no" # Change `color indicator` depending # Pager View Options set pager_index_lines = 10 # Shows 10 lines of index when pager is active set pager_context = 3 set pager_stop set menu_scroll set tilde unset markers ${colors} ''; }; }; }