1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-02 23:21:02 +01:00
home-manager/tests/modules/services/imapnotify/darwin/launchd.nix
Austin Horstman 7a64c02340 tests/imapnotify: reorganize darwin and linux
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-22 23:58:37 -05:00

41 lines
903 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}
'';
}