dotfiles/nixos/email-accounts.nix
2021-08-01 07:58:21 +01:00

62 lines
1.5 KiB
Nix

{ config, pkgs, ... }:
{
home-manager.users.cyryl = {...}: {
accounts.email.accounts.cyplo = {
primary = true;
address = "cyplo@cyplo.dev";
aliases = [ "cyplo@cyplo.net" ];
realName = "Cyryl Płotnicki";
userName = "cyplo";
imap = {
host = "127.0.0.1";
port = 1143;
tls.enable = false;
};
smtp = {
host = "127.0.0.1";
port = 1025;
tls.enable = false;
};
notmuch.enable = true;
astroid.enable = true;
neomutt.enable = true;
msmtp.enable = true;
passwordCommand = "${pkgs.pass}/bin/pass proton-bridge";
offlineimap.enable = true;
folders = {
drafts = "Drafts";
inbox = "INBOX";
sent = "Sent";
trash = "Trash";
};
};
programs.msmtp.enable = true;
programs.offlineimap.enable = true;
programs.notmuch = {
enable = true;
hooks.preNew = "${pkgs.offlineimap}/bin/offlineimap -o";
};
programs.alot = {
enable = true;
};
programs.astroid = {
enable = true;
pollScript = "${pkgs.notmuch}/bin/notmuch new";
};
programs.neomutt = {
enable = true;
};
home.packages = with pkgs; [
hydroxide
];
systemd.user.services."hydroxide" = {
Unit.Description = "Bridge to ProtonMail";
Install.WantedBy = [ "default.target" ];
Service.ExecStart = "${pkgs.hydroxide}/bin/hydroxide serve";
};
};
}