mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-01 06:31:04 +01:00
41 lines
900 B
Nix
41 lines
900 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
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@";
|
|
}
|
|
);
|
|
};
|
|
|
|
nmt.script =
|
|
let
|
|
serviceFileName = "org.nix-community.home.imapnotify-hm-example.com.plist";
|
|
in
|
|
''
|
|
serviceFile="LaunchAgents/${serviceFileName}"
|
|
serviceFileNormalized="$(normalizeStorePaths "$serviceFile")"
|
|
assertFileExists $serviceFile
|
|
assertFileContent $serviceFileNormalized ${./launchd.plist}
|
|
'';
|
|
}
|