email: Fix imapnotify boxes

This commit is contained in:
Leonardo Eugênio 2023-02-18 12:16:06 -03:00
parent cb0c51399d
commit a45a6dcfd4

View file

@ -8,15 +8,11 @@ let
${pkgs.libnotify}/bin/notify-send "You've got mail!" ${pkgs.libnotify}/bin/notify-send "You've got mail!"
''; '';
defaultAccountSettings = { defaultAccountSettings = { boxes, }: {
astroid.enable = true; astroid.enable = true;
imapnotify = { imapnotify = {
enable = true; enable = true;
boxes = [ inherit boxes;
"INBOX"
"INBOX.Newsletter"
"INBOX.Git"
];
onNotify = downloadEmails; onNotify = downloadEmails;
onNotifyPost = onNewEmails; onNotifyPost = onNewEmails;
}; };
@ -41,7 +37,13 @@ in
passwordCommand = toString (pkgs.writeShellScript "get_pass" '' passwordCommand = toString (pkgs.writeShellScript "get_pass" ''
pass "disroot.org" | head -n1 pass "disroot.org" | head -n1
''); '');
} // defaultAccountSettings; } // defaultAccountSettings {
boxes = [
"INBOX"
"INBOX.Newsletter"
"INBOX.Git"
];
};
"work" = { "work" = {
realName = "Leonardo Eugênio"; realName = "Leonardo Eugênio";
address = "leonardo@wopus.com.br"; address = "leonardo@wopus.com.br";
@ -51,7 +53,7 @@ in
passwordCommand = toString (pkgs.writeShellScript "get_pass" '' passwordCommand = toString (pkgs.writeShellScript "get_pass" ''
pass "Trabalho/wopus_email/leonardo@wopus.com.br" | head -n1 pass "Trabalho/wopus_email/leonardo@wopus.com.br" | head -n1
''); '');
} // defaultAccountSettings; } // defaultAccountSettings { boxes = [ "INBOX" ]; };
}; };
services.imapnotify.enable = true; services.imapnotify.enable = true;