UPKMMJFFBYJRZHQDUNLVXKVJH32VNY5ZGEH3GXI3KOG7NO5OJF3AC
let
pkgs = import <nixpkgs> { };
in email: realName: imapHost: smtpHost: {
address = email;
userName = email;
realName = realName;
passwordCommand = "${pkgs.gnome3.libsecret}/bin/secret-tool lookup email ${email}";
imap.host = imapHost;
smtp.host = smtpHost;
msmtp.enable = true;
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
extraConfig.account = {
# NOTE microsoft office 365 imap servers may require this to be 1
# because they do not support concurrent imap commands
PipelineDepth = 50;
};
};
}
let
template = import ./template.nix;
in (template "email@email.domain" "Real Name" "imap.email.domain" "smtp.email.domain") // {
# you can pass extra params here if necessary. otherwise omit the `// { ... }`
primary = true;
}
msmtp.enable = true;
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
extraConfig.account = {
# NOTE microsoft office 365 imap servers may require this to be 1
# because they do not support concurrent imap commands
PipelineDepth = 50;
};
};
};
in {
{
chris-thesogu = (emailAttributes "chris@thesogu.com") // {
primary = true;
realName = "Chris Cummings";
imap.host = "imap.fastmail.com";
smtp.host = "smtp.fastmail.com";
};
# add a new email account by adding a nix module, then adding it to the .gitignore
# see example-email.nix for an example
# e.g.:
# example = import ./example-email.nix;
personal = import ./personal.nix;