Files
Austin Horstman 0a2d091b2c getmail: add per-account INI settings
Expose native filter, retriever, and destination configuration while
retaining account defaults and legacy boolean aliases. Preserve tuple
rendering and allow complete native retriever configuration without an
IMAP account block.
2026-09-21 12:08:57 -05:00

41 lines
1.1 KiB
Nix

{ config, ... }:
{
imports = [ ../../accounts/email-test-accounts.nix ];
config = {
accounts.email.accounts = {
"hm@example.com" = {
getmail = {
enable = true;
mailboxes = [
"INBOX"
"Sent"
"Work"
];
destinationCommand = "/bin/maildrop";
delete = false;
};
imap.port = 993;
};
};
assertions = [
{
assertion = !config.accounts.email.accounts.hm-account.getmail.delete;
message = "Disabled getmail accounts retain the legacy delete default.";
}
{
assertion = config.accounts.email.accounts.hm-account.getmail.readAll;
message = "Disabled getmail accounts retain the legacy readAll default.";
}
];
nmt.script = ''
assertPathNotExists home-files/.getmail/getmaildisabled-account
assertPathNotExists home-files/.getmail/getmailhm-account
assertFileExists home-files/.getmail/getmailrc
assertFileContent home-files/.getmail/getmailrc ${./getmail-expected.conf}
'';
};
}