fork/home-manager

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

Robert Helgessonimapnotify: move testb70db52f

master
855 B39 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  imports = [ ../../accounts/email-test-accounts.nix ];
7
8  accounts.email.accounts = {
9    "hm@example.com" = {
10      notmuch.enable = true;
11      imap.port = 993;
12
13      imapnotify = {
14        enable = true;
15        boxes = [ "Inbox" ];
16        onNotify = ''
17          ${pkgs.notmuch}/bin/notmuch new
18        '';
19      };
20    };
21  };
22
23  services.imapnotify = {
24    enable = true;
25    package = (config.lib.test.mkStubPackage {
26      name = "goimapnotify";
27      outPath = "@goimapnotify@";
28    });
29  };
30
31  test.stubs.notmuch = { };
32
33  nmt.script = ''
34    serviceFile="home-files/.config/systemd/user/imapnotify-hm-example.com.service"
35    serviceFileNormalized="$(normalizeStorePaths "$serviceFile")"
36    assertFileExists $serviceFile
37    assertFileContent $serviceFileNormalized ${./imapnotify.service}
38  '';
39}