goimapnotify: remove test dependency on notmuch
Also minor test cleanup.
This commit is contained in:
parent
34db2f0521
commit
f288310b7a
|
@ -5,37 +5,36 @@ with lib;
|
||||||
{
|
{
|
||||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||||
|
|
||||||
config = {
|
accounts.email.accounts = {
|
||||||
accounts.email.accounts = {
|
"hm@example.com" = {
|
||||||
"hm@example.com" = {
|
notmuch.enable = true;
|
||||||
notmuch.enable = true;
|
imap.port = 993;
|
||||||
imap.port = 993;
|
|
||||||
|
|
||||||
imapnotify = {
|
imapnotify = {
|
||||||
enable = true;
|
enable = true;
|
||||||
boxes = [ "Inbox" ];
|
boxes = [ "Inbox" ];
|
||||||
onNotify = ''
|
onNotify = ''
|
||||||
${pkgs.notmuch}/bin/notmuch new
|
${pkgs.notmuch}/bin/notmuch new
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.imapnotify = {
|
|
||||||
enable = true;
|
|
||||||
package = (config.lib.test.mkStubPackage {
|
|
||||||
name = "goimapnotify";
|
|
||||||
outPath = "@goimapnotify@";
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
nmt.script = let
|
|
||||||
serviceFileName =
|
|
||||||
"org.nix-community.home.imapnotify-hm-example.com.plist";
|
|
||||||
in ''
|
|
||||||
serviceFile=LaunchAgents/${serviceFileName}
|
|
||||||
assertFileExists $serviceFile
|
|
||||||
assertFileContent $serviceFile ${./launchd.plist}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.imapnotify = {
|
||||||
|
enable = true;
|
||||||
|
package = (config.lib.test.mkStubPackage {
|
||||||
|
name = "goimapnotify";
|
||||||
|
outPath = "@goimapnotify@";
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
test.stubs.notmuch = { };
|
||||||
|
|
||||||
|
nmt.script = let
|
||||||
|
serviceFileName = "org.nix-community.home.imapnotify-hm-example.com.plist";
|
||||||
|
in ''
|
||||||
|
serviceFile=LaunchAgents/${serviceFileName}
|
||||||
|
assertFileExists $serviceFile
|
||||||
|
assertFileContent $serviceFile ${./launchd.plist}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue