fork/home-manager

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

Sumner Evansneomutt: add support for signature command (#2899)f8b51be7

master
1.1 KiB45 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        };
18        imap.port = 993;
19        signature = {
20          showSignature = "append";
21          command = pkgs.writeScript "signature" "echo This is my signature";
22        };
23      };
24    };
25
26    programs.neomutt = {
27      enable = true;
28      vimKeys = false;
29    };
30
31    test.stubs.neomutt = { };
32
33    nmt.script = ''
34      assertFileExists home-files/.config/neomutt/neomuttrc
35      assertFileExists home-files/.config/neomutt/hm@example.com
36      assertFileContent home-files/.config/neomutt/neomuttrc ${
37        ./neomutt-expected.conf
38      }
39      expectedSignature=$(normalizeStorePaths "home-files/.config/neomutt/hm@example.com")
40      assertFileContent "$expectedSignature" ${
41        ./hm-example.com-signature-command-expected
42      }
43    '';
44  };
45}