dotfiles/nixos/email-accounts.nix
2021-12-26 15:32:54 +00:00

65 lines
1.5 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";
imap = {
host = "127.0.0.1";
port = 1143;
tls = {
enable = false;
useStartTls = false;
};
};
smtp = {
host = "127.0.0.1";
port = 1025;
tls.enable = 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; [
hydroxide
];
systemd.user.services."hydroxide" = {
Unit.Description = "Bridge to ProtonMail";
Install.WantedBy = [ "default.target" ];
Service.ExecStart = "${unstable.hydroxide}/bin/hydroxide serve";
};
};
}