{ lib, config, pkgs, ... }: with lib; let cfg = config.progs.aerc; in { options.progs.aerc = { enable = mkOption { type = types.bool; default = false; description = "Add neomutt with my personal configuration"; }; }; # See: https://git.sbruder.de/simon/nixos-config/src/branch/master/users/simon/modules/mail/aerc/default.nix config = mkIf cfg.enable { programs.aerc = { enable = true; extraConfig = { general.unsafe-accounts-conf = true; filters = { "text/plain" = "${./colorize}"; "text/html" = "html"; }; }; extraBinds = { messages = { "q" = ":quit"; "gt" = ":next-tab"; "gT" = ":prev-tab"; "j" = ":next"; "" = ":next"; "" = ":next 50%"; "k" = ":prev"; "" = ":prev"; "" = ":prev 50%"; "gg" = ":select 0"; "G" = ":select -1"; "J" = ":next-folder"; "K" = ":prev-folder"; "" = ":view"; }; view = { "q" = ":close"; "O" = ":open"; "S" = ":save"; "f" = ":forward"; "rr" = ":reply -a"; "rq" = ":reply -aq"; "Rr" = ":reply"; "Rq" = ":reply -q"; "" = ":prev-part"; "" = ":next-part"; "J" = ":next"; "K" = ":prev"; }; }; }; }; }