mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 13:39:46 +01:00
25a6a6d298
* neomutt: support list in binds.map Closes #1245 Adds support for specifying programs.neomutt.binds[].map as a list. If specified as a list, then the binds will be concatenated with a ",". * neomutt: add deprecation warning for (binds|macros).map as string Added note that specifying 'programs.neomutt.(binds|macros).map' as a string is deprecated. Instead, use the list form. * neomutt: note deprecation warning in release notes Added note that specifying 'programs.neomutt.(binds|macros).map' as a single string is deprecated in favor of specifying it as a list * neomutt: add assertion that map is not empty Added an assertion that each 'programs.neomutt.(binds|macros).map' list contains at least one element.
67 lines
1.5 KiB
Nix
67 lines
1.5 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
imports = [ ../../accounts/email-test-accounts.nix ];
|
|
|
|
config = {
|
|
accounts.email.accounts = {
|
|
"hm@example.com" = {
|
|
notmuch.enable = true;
|
|
neomutt = {
|
|
enable = true;
|
|
extraConfig = ''
|
|
color status cyan default
|
|
'';
|
|
};
|
|
imap.port = 993;
|
|
};
|
|
};
|
|
|
|
programs.neomutt = {
|
|
enable = true;
|
|
vimKeys = false;
|
|
|
|
binds = [
|
|
{
|
|
action = "complete-query";
|
|
key = "<Tab>";
|
|
map = [ "editor" ];
|
|
}
|
|
{
|
|
action = "sidebar-prev";
|
|
key = "\\Cp";
|
|
map = [ "index" "pager" ];
|
|
}
|
|
];
|
|
|
|
macros = [
|
|
{
|
|
action = "<save-message>?<tab>";
|
|
key = "s";
|
|
map = [ "index" ];
|
|
}
|
|
{
|
|
action = "<change-folder>?<change-dir><home>^K=<enter><tab>";
|
|
key = "c";
|
|
map = [ "index" "pager" ];
|
|
}
|
|
];
|
|
};
|
|
|
|
nixpkgs.overlays =
|
|
[ (self: super: { neomutt = pkgs.writeScriptBin "dummy-neomutt" ""; }) ];
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/neomutt/neomuttrc
|
|
assertFileExists home-files/.config/neomutt/hm@example.com
|
|
assertFileContent home-files/.config/neomutt/neomuttrc ${
|
|
./neomutt-with-binds-expected.conf
|
|
}
|
|
assertFileContent home-files/.config/neomutt/hm@example.com ${
|
|
./hm-example.com-expected
|
|
}
|
|
'';
|
|
};
|
|
}
|