Getting aerc working. Separating out mail into its own nix file

master
Dustin Swan 5 years ago
parent a8daa32464
commit 1d0fee7cd2
Signed by: dustinswan
GPG Key ID: AB49BD6B2B3A6377

@ -3,7 +3,7 @@
{
# nodePackages.eslint
home.packages = with pkgs; [
ripgrep fd wget silver-searcher tree ranger nodejs yarn mosh w3m urlview nmap rtv gnupg youtube-dl nodePackages.tern nodePackages.javascript-typescript-langserver nodePackages.js-beautify nodePackages.prettier ffmpeg ispell aspell aspellDicts.en aspellDicts.en-computers aspellDicts.en-science aspellDicts.fr aspellDicts.de aspellDicts.eo aspellDicts.es hexyl nnn entr httpie cacert
ripgrep fd wget silver-searcher tree ranger nodejs yarn mosh w3m urlview nmap rtv gnupg youtube-dl nodePackages.tern nodePackages.javascript-typescript-langserver nodePackages.js-beautify nodePackages.prettier ffmpeg ispell aspell aspellDicts.en aspellDicts.en-computers aspellDicts.en-science aspellDicts.fr aspellDicts.de aspellDicts.eo aspellDicts.es hexyl nnn entr httpie cacert catimg tldr aerc
];
home.sessionVariables = {
@ -162,94 +162,6 @@
};
};
accounts.email = {
maildirBasePath = "Mail";
certificatesFile = "${builtins.getEnv "HOME"}/.nix-profile/etc/ssl/certs/ca-bundle.crt";
accounts = {
FastMail = {
address = "dustin@dustinswan.com";
aliases = "dustinswan@gmail.com";
realName = "Dustin Swan";
primary = true;
folders = {
inbox = "INBOX";
drafts = "INBOX.Drafts";
sent = "INBOX.Sent";
trash = "INBOX.Trash";
};
userName = "dustinswan@fastmail.com";
imap.host = "mail.messagingengine.com";
smtp.host = "mail.messagingengine.com";
passwordCommand = "gpg -dq ${builtins.getEnv "HOME"}/.dustinswan@fastmail.com-password.gpg";
offlineimap.enable = true;
msmtp.enable = true;
signature = {
text = ''
Dustin Swan
dustinswan.com
'';
showSignature = "append";
};
};
Visionable = {
address = "dswan@visionable.com";
aliases= "dswan@iocom.com";
realName = "Dustin Swan";
folders = {
inbox = "INBOX";
drafts = "Drafts";
sent = "Sent Items";
trash = "Deleted Items";
};
userName = "dswan@visionable.com";
imap.host = "outlook.office365.com";
smtp.host = "smtp.office365.com";
passwordCommand = "gpg -dq ${builtins.getEnv "HOME"}/.dswan@visionable.com-password.gpg";
offlineimap = {
enable = true;
extraConfig.remote = {
folderfilter = ''lambda folder: folder not in [
'Calendar',
'Calendar/Birthdays',
'Calendar/IOCOM Holidays',
'Calendar/United States holidays',
'Contacts',
'Contacts/Sub Folder 1',
'Contacts/Sub Folder 2',
'Contacts/Skype for Business Contacts',
'Deleted Items',
'Drafts',
'Journal',
'Junk Email',
'Notes',
'Outbox',
'Sync Issues',
'Sync Issues/Conflicts',
'Sync Issues/Local Failures',
'Sync Issues/Server Failures',
'Tasks',
'Tasks/Sub Folder 1',
'Tasks/Sub Folder 2'
]
'';
};
};
msmtp.enable = true;
signature = {
text = ''
Dustin Swan, Software Developer
Visionable Ltd | https://visionable.com
dswan@visionable.com
'';
showSignature = "append";
};
};
};
};
programs.msmtp.enable = true;
programs.offlineimap.enable = true;

@ -189,7 +189,7 @@
};
};
imports = [ ./home-common.nix ];
imports = [ ./home-common.nix ./home-mail.nix ];
programs.alacritty.settings.font.size = 10.0;
}

@ -1,7 +1,7 @@
{ pkgs, lib, ... }:
{
home.packages = with pkgs; [ pinentry_mac ];
home.packages = with pkgs; [ pinentry_mac terminal-notifier ];
home.file.gpg-agent = {
target = ".gnupg/gpg-agent.conf";
@ -14,5 +14,5 @@
programs.zsh.initExtra = "source ~/.nix-profile/etc/profile.d/nix.sh";
imports = [ ./home-common.nix ];
imports = [ ./home-common.nix ./home-mail.nix ];
}

@ -0,0 +1,106 @@
{ pkgs, ... }:
{
home.file.aerc-accounts = {
target = ".config/aerc/accounts.conf";
# source = ./aerc-accounts.conf;
text = ''[FastMail]
source = maildir://~/Mail/FastMail
from = "Dustin Swan <dustin@dustinswan.com>"
outgoing = ${builtins.getEnv "HOME"}/.nix-profile/bin/msmtp --read-envelope-from
[Visionable]
source = maildir://~/Mail/Visionable
from = "Dustin Swan <dswan@visionable.com>"
outgoing = ${builtins.getEnv "HOME"}/.nix-profile/bin/msmtp --read-envelope-from'';
executable = false;
};
accounts.email = {
maildirBasePath = "Mail";
certificatesFile = "${builtins.getEnv "HOME"}/.nix-profile/etc/ssl/certs/ca-bundle.crt";
accounts = {
FastMail = {
address = "dustin@dustinswan.com";
aliases = "dustinswan@gmail.com";
realName = "Dustin Swan";
primary = true;
folders = {
inbox = "INBOX";
drafts = "INBOX.Drafts";
sent = "INBOX.Sent";
trash = "INBOX.Trash";
};
userName = "dustinswan@fastmail.com";
imap.host = "mail.messagingengine.com";
smtp.host = "mail.messagingengine.com";
passwordCommand = "gpg -dq ${builtins.getEnv "HOME"}/.dustinswan@fastmail.com-password.gpg";
offlineimap.enable = true;
msmtp.enable = true;
signature = {
text = ''
Dustin Swan
dustinswan.com
'';
showSignature = "append";
};
};
Visionable = {
address = "dswan@visionable.com";
aliases= "dswan@iocom.com";
realName = "Dustin Swan";
folders = {
inbox = "INBOX";
drafts = "Drafts";
sent = "Sent Items";
trash = "Deleted Items";
};
userName = "dswan@visionable.com";
imap.host = "outlook.office365.com";
smtp.host = "smtp.office365.com";
passwordCommand = "gpg -dq ${builtins.getEnv "HOME"}/.dswan@visionable.com-password.gpg";
offlineimap = {
enable = true;
extraConfig.remote = {
folderfilter = ''lambda folder: folder not in [
'Calendar',
'Calendar/Birthdays',
'Calendar/IOCOM Holidays',
'Calendar/United States holidays',
'Contacts',
'Contacts/Sub Folder 1',
'Contacts/Sub Folder 2',
'Contacts/Skype for Business Contacts',
'Deleted Items',
'Drafts',
'Journal',
'Junk Email',
'Notes',
'Outbox',
'Sync Issues',
'Sync Issues/Conflicts',
'Sync Issues/Local Failures',
'Sync Issues/Server Failures',
'Tasks',
'Tasks/Sub Folder 1',
'Tasks/Sub Folder 2'
]
'';
};
};
msmtp.enable = true;
signature = {
text = ''
Dustin Swan, Software Developer
Visionable Ltd | https://visionable.com
dswan@visionable.com
'';
showSignature = "append";
};
};
};
};
}
Loading…
Cancel
Save