diff --git a/modules/services/imapnotify.nix b/modules/services/imapnotify.nix index a79cba35e..63e61e7c7 100644 --- a/modules/services/imapnotify.nix +++ b/modules/services/imapnotify.nix @@ -72,6 +72,7 @@ let inherit (account.imap) host; inherit port; tls = account.imap.tls.enable; + tlsOptions.starttls = account.imap.tls.useStartTls; username = account.userName; passwordCmd = lib.concatMapStringsSep " " lib.escapeShellArg account.passwordCommand; diff --git a/tests/modules/services/imapnotify/imapnotify-config.json b/tests/modules/services/imapnotify/imapnotify-config.json new file mode 100644 index 000000000..21276857d --- /dev/null +++ b/tests/modules/services/imapnotify/imapnotify-config.json @@ -0,0 +1 @@ +{"boxes":["Inbox"],"host":"imap.example.com","onNewMail":"@notmuch@/bin/notmuch new\n","passwordCmd":"'password-command'","port":993,"tls":true,"tlsOptions":{"starttls":false},"username":"home.manager"} \ No newline at end of file diff --git a/tests/modules/services/imapnotify/imapnotify.nix b/tests/modules/services/imapnotify/imapnotify.nix index c607c042c..5a9e2b003 100644 --- a/tests/modules/services/imapnotify/imapnotify.nix +++ b/tests/modules/services/imapnotify/imapnotify.nix @@ -35,5 +35,10 @@ with lib; 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} ''; }