mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-02 19:49:18 +00:00
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.
41 lines
1.1 KiB
Nix
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}
|
|
'';
|
|
};
|
|
}
|