mirror of
https://github.com/nix-community/home-manager
synced 2024-08-18 10:06:31 +02:00
40 lines
855 B
Nix
40 lines
855 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
imports = [ ../../accounts/email-test-accounts.nix ];
|
|
|
|
accounts.email.accounts = {
|
|
"hm@example.com" = {
|
|
notmuch.enable = true;
|
|
imap.port = 993;
|
|
|
|
imapnotify = {
|
|
enable = true;
|
|
boxes = [ "Inbox" ];
|
|
onNotify = ''
|
|
${pkgs.notmuch}/bin/notmuch new
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
services.imapnotify = {
|
|
enable = true;
|
|
package = (config.lib.test.mkStubPackage {
|
|
name = "goimapnotify";
|
|
outPath = "@goimapnotify@";
|
|
});
|
|
};
|
|
|
|
test.stubs.notmuch = { };
|
|
|
|
nmt.script = ''
|
|
serviceFile="home-files/.config/systemd/user/imapnotify-hm-example.com.service"
|
|
serviceFileNormalized="$(normalizeStorePaths "$serviceFile")"
|
|
assertFileExists $serviceFile
|
|
assertFileContent $serviceFileNormalized ${./imapnotify.service}
|
|
'';
|
|
}
|