mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-15 04:37:21 +00:00
add icloud account to nix
This commit is contained in:
parent
0828229e9d
commit
83050bd87d
1 changed files with 22 additions and 11 deletions
|
@ -2,18 +2,11 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
passCmd = path: "${pkgs.pass}/bin/pass ${path}";
|
passCmd = path: "${pkgs.pass}/bin/pass ${path}";
|
||||||
gmailAccount = address: {
|
generalAccount = address: {
|
||||||
inherit address;
|
inherit address;
|
||||||
flavor = "gmail.com";
|
userName = address;
|
||||||
folders = {
|
|
||||||
drafts = "[Gmail].Drafts";
|
|
||||||
inbox = "INBOX";
|
|
||||||
sent = "[Gmail].Sent Mail";
|
|
||||||
trash = "[Gmail].Trash";
|
|
||||||
};
|
|
||||||
mu.enable = true;
|
mu.enable = true;
|
||||||
offlineimap.enable = true;
|
offlineimap.enable = true;
|
||||||
passwordCommand = passCmd "gmail/${address}";
|
|
||||||
imap.tls = {
|
imap.tls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
useStartTls = true;
|
useStartTls = true;
|
||||||
|
@ -22,12 +15,30 @@ let
|
||||||
enable = true;
|
enable = true;
|
||||||
useStartTls = true;
|
useStartTls = true;
|
||||||
};
|
};
|
||||||
|
passwordCommand = passCmd "email/${address}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gmailAccount = address: ({
|
||||||
|
flavor = "gmail.com";
|
||||||
|
folders = {
|
||||||
|
drafts = "[Gmail].Drafts";
|
||||||
|
inbox = "INBOX";
|
||||||
|
sent = "[Gmail].Sent Mail";
|
||||||
|
trash = "[Gmail].Trash";
|
||||||
|
};
|
||||||
|
} // generalAccount address);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
accounts.email.accounts = {
|
accounts.email.accounts = {
|
||||||
gmail = gmailAccount "willemleitso@gmail.com";
|
gmail = (gmailAccount "willemleitso@gmail.com") // { realName = "Willem Leitso"; };
|
||||||
leitso = (gmailAccount "willem@leit.so") // { primary = true; };
|
icloud = (pkgs.lib.attrsets.recursiveUpdate {
|
||||||
|
flavor = "plain";
|
||||||
|
imap.host = "imap.mail.me.com";
|
||||||
|
imap.port = 993;
|
||||||
|
smtp.host = "smtp.mail.me.com";
|
||||||
|
smtp.port = 587;
|
||||||
|
} (generalAccount "coalminecraft@icloud.com")) // { folders.inbox = "INBOX"; };
|
||||||
|
leitso = (gmailAccount "willem@leit.so") // { primary = true; realName = "Willem Leitso"; };
|
||||||
wnuke9 = gmailAccount "wnuke9@gmail.com";
|
wnuke9 = gmailAccount "wnuke9@gmail.com";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue