update email config
This commit is contained in:
parent
b0610e6854
commit
f42a3fd7c6
|
@ -1,22 +1,12 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
let
|
accounts.email.accounts = let
|
||||||
|
mkAccount = username: host: passName: {
|
||||||
get_pass = pkgs.writeShellScript "get_pass" ''
|
|
||||||
pass disroot.org | head -n1
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
accounts.email.accounts = {
|
|
||||||
"personal" = {
|
|
||||||
primary = true;
|
|
||||||
realName = "Leonardo Eugênio";
|
realName = "Leonardo Eugênio";
|
||||||
address = "lelgenio@disroot.org";
|
address = "${username}@${host}";
|
||||||
userName = "lelgenio";
|
userName = username;
|
||||||
astroid.enable = true;
|
astroid.enable = true;
|
||||||
imap = {
|
imap.host = host;
|
||||||
host = "disroot.org";
|
smtp.host = host;
|
||||||
# port = 993;
|
|
||||||
};
|
|
||||||
smtp = { host = "disroot.org"; };
|
|
||||||
imapnotify = {
|
imapnotify = {
|
||||||
enable = true;
|
enable = true;
|
||||||
onNotify = "${pkgs.isync}/bin/mbsync -a";
|
onNotify = "${pkgs.isync}/bin/mbsync -a";
|
||||||
|
@ -29,8 +19,13 @@ in {
|
||||||
};
|
};
|
||||||
msmtp.enable = true;
|
msmtp.enable = true;
|
||||||
notmuch.enable = true;
|
notmuch.enable = true;
|
||||||
passwordCommand = toString get_pass;
|
passwordCommand = toString (pkgs.writeShellScript "get_pass" ''
|
||||||
|
pass ${passName} | head -n1
|
||||||
|
'');
|
||||||
};
|
};
|
||||||
|
in {
|
||||||
|
"personal" = (mkAccount "lelgenio" "disroot.org" "disroot.org") // { primary = true; } ;
|
||||||
|
"work" = mkAccount "leonardo" "wopus.com.br" "Trabalho/wopus_email/leonardo@wopus.com.br";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.imapnotify.enable = true;
|
services.imapnotify.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue