fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert Helgessontests: add option `test.stubs`cb09a968

master
1.1 KiB49 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  imports = [ ../../accounts/email-test-accounts.nix ];
7
8  config = {
9    accounts.email.accounts = {
10      "hm@example.com" = {
11        notmuch.enable = true;
12        neomutt = {
13          enable = true;
14          extraConfig = ''
15            color status cyan default
16          '';
17          mailboxName = "someCustomName";
18          extraMailboxes = [
19            "Sent"
20            {
21              mailbox = "Junk Email";
22              name = "Spam";
23            }
24            { mailbox = "Trash"; }
25          ];
26        };
27        imap.port = 993;
28      };
29    };
30
31    programs.neomutt = {
32      enable = true;
33      vimKeys = false;
34    };
35
36    test.stubs.neomutt = { };
37
38    nmt.script = ''
39      assertFileExists home-files/.config/neomutt/neomuttrc
40      assertFileExists home-files/.config/neomutt/hm@example.com
41      assertFileContent home-files/.config/neomutt/neomuttrc ${
42        ./neomutt-with-named-mailboxes-expected.conf
43      }
44      assertFileContent home-files/.config/neomutt/hm@example.com ${
45        ./hm-example.com-expected
46      }
47    '';
48  };
49}