1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
home-manager/tests/modules/programs/neomutt/neomutt-with-binds-with-warning.nix
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00

64 lines
1.5 KiB
Nix

{
imports = [ ../../accounts/email-test-accounts.nix ];
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"
];
}
];
};
test.asserts.warnings.expected = [
"Specifying 'programs.neomutt.(binds|macros).map' as a string is deprecated, use a list of strings instead. See https://github.com/nix-community/home-manager/pull/1885."
];
nmt.script = ''
assertFileExists home-files/.config/neomutt/neomuttrc
assertFileExists home-files/.config/neomutt/hm@example.com
assertFileContent $(normalizeStorePaths home-files/.config/neomutt/neomuttrc) ${./neomutt-with-binds-expected.conf}
assertFileContent $(normalizeStorePaths home-files/.config/neomutt/hm@example.com) ${./hm-example.com-expected}
'';
}