mirror of
https://github.com/nix-community/home-manager
synced 2024-12-18 15:59:48 +01:00
68fe8623ad
This patch started by addresssing the code review comments to close https://github.com/rycee/home-manager/pull/290. However initiating a new pull request it became clear, that home-manager changed significantly since then. This changes the initial pull request to be consistent with the email account management in home-manager now. It also adds a simple test and support for multiple accounts.
26 lines
598 B
Nix
26 lines
598 B
Nix
{ 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;
|
|
mailboxes = ["INBOX" "Sent" "Work"];
|
|
destinationCommand = "/bin/maildrop";
|
|
delete = false;
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.getmail/getmailhm@example.com
|
|
assertFileContent home-files/.getmail/getmailhm@example.com ${./getmail-expected.conf}
|
|
'';
|
|
};
|
|
}
|