1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

imapnotify: only write onNew* if a value is available

This commit is contained in:
Robert Helgesson 2021-10-18 08:42:13 +02:00
parent d244ca125f
commit 0d110a0936
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -44,17 +44,19 @@ let
143;
toJSON = builtins.toJSON;
in toJSON {
in toJSON ({
inherit (account.imap) host;
inherit port;
tls = account.imap.tls.enable;
username = account.userName;
passwordCmd =
lib.concatMapStringsSep " " lib.escapeShellArg account.passwordCommand;
onNewMail = account.imapnotify.onNotify;
onNewMailPost = account.imapnotify.onNotifyPost;
inherit (account.imapnotify) boxes;
});
} // optionalAttrs (account.imapnotify.onNotify != "") {
onNewMail = account.imapnotify.onNotify;
} // optionalAttrs (account.imapnotify.onNotifyPost != "") {
onNewMailPost = account.imapnotify.onNotifyPost;
}));
in {
meta.maintainers = [ maintainers.nickhu ];