aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/programs/getmail.nix
blob: 12806c25679b3b3b0b7518de9acdcc256c877b2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ 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}
    '';
  };
}