fork/home-manager

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

Robert Helgessonimapnotify: move testb70db52f

master
905 B41 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 = let
34    serviceFileName = "org.nix-community.home.imapnotify-hm-example.com.plist";
35  in ''
36    serviceFile="LaunchAgents/${serviceFileName}"
37    serviceFileNormalized="$(normalizeStorePaths "$serviceFile")"
38    assertFileExists $serviceFile
39    assertFileContent $serviceFileNormalized ${./launchd.plist}
40  '';
41}