1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
home-manager/tests/modules/services/imapnotify/linux/imapnotify.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

43 lines
1.1 KiB
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" ];
extraArgs = [ "--wait 1" ];
onNotify = ''
${pkgs.notmuch}/bin/notmuch new
'';
};
};
};
services.imapnotify = {
enable = true;
package = (
config.lib.test.mkStubPackage {
name = "goimapnotify";
outPath = "@goimapnotify@";
}
);
};
nmt.script = ''
serviceFile="home-files/.config/systemd/user/imapnotify-hm-example.com.service"
serviceFileNormalized="$(normalizeStorePaths "$serviceFile")"
assertFileExists $serviceFile
assertFileContent $serviceFileNormalized ${./imapnotify.service}
configFile="home-files/.config/imapnotify/imapnotify-hm-example.com-config.json"
configFileNormalized="$(normalizeStorePaths "$configFile")"
assertFileExists $configFile
assertFileContent $configFileNormalized ${./imapnotify-config.json}
'';
}