home-manager/tests/modules/programs/getmail/getmail.nix

32 lines
675 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
with lib;
{
imports = [ ../../accounts/email-test-accounts.nix ];
config = {
home.username = "hm-user";
home.homeDirectory = "/home/hm-user";
accounts.email.accounts = {
"hm@example.com" = {
getmail = {
enable = true;
2020-02-02 00:39:17 +01:00
mailboxes = [ "INBOX" "Sent" "Work" ];
destinationCommand = "/bin/maildrop";
delete = false;
};
imap.port = 993;
};
};
nmt.script = ''
assertFileExists home-files/.getmail/getmailhm@example.com
2020-02-02 00:39:17 +01:00
assertFileContent home-files/.getmail/getmailhm@example.com ${
./getmail-expected.conf
}
'';
};
}