dotfiles/nixos/email-accounts.nix
2022-01-08 10:23:29 +00:00

68 lines
1.6 KiB
Nix

{ config, pkgs, inputs, ... }:
let
unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
in
{
home-manager.users.cyryl = { ... }: {
accounts.email.accounts.cyplo = {
primary = true;
address = "cyplo@cyplo.dev";
aliases = [ "cyplo@cyplo.net" ];
realName = "Cyryl Płotnicki";
userName = "cyplo@cyplo.dev";
imap = {
host = "127.0.0.1";
port = 1143;
tls = {
enable = false;
useStartTls = false;
};
};
smtp = {
host = "127.0.0.1";
port = 1025;
tls = {
enable = false;
useStartTls = false;
};
};
notmuch.enable = true;
himalaya.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.himalaya = {
enable = true;
package = unstable.himalaya;
};
home.packages = with pkgs; [
unstable.protonmail-bridge
];
systemd.user.services."proton-bridge" = {
Unit.Description = "Bridge to ProtonMail";
Install.WantedBy = [ "default.target" ];
Service.ExecStart = "${unstable.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
};
};
}