mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-10 18:57:22 +00:00
Instead of having to manually stub packages that should not be downloaded we instead automatically stub all packages (except a small list of whitelisted ones). Tests can re-introduce the real package by using the `realPkgs` module argument.
39 lines
962 B
Nix
39 lines
962 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
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;
|
|
signature = {
|
|
showSignature = "append";
|
|
command = pkgs.writeScript "signature" "echo This is my signature";
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.neomutt = {
|
|
enable = true;
|
|
vimKeys = false;
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/neomutt/neomuttrc
|
|
assertFileExists home-files/.config/neomutt/hm@example.com
|
|
assertFileContent home-files/.config/neomutt/neomuttrc ${
|
|
./neomutt-expected.conf
|
|
}
|
|
expectedSignature=$(normalizeStorePaths "home-files/.config/neomutt/hm@example.com")
|
|
assertFileContent "$expectedSignature" ${
|
|
./hm-example.com-signature-command-expected
|
|
}
|
|
'';
|
|
}
|