dotfiles/nixos/email-accounts.nix

66 lines
1.5 KiB
Nix
Raw Normal View History

2021-12-26 15:32:54 +00:00
{ config, pkgs, inputs, ... }:
let
unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
in
2021-06-13 12:05:16 +01:00
{
2021-11-22 19:32:26 +00:00
home-manager.users.cyryl = { ... }: {
2021-06-13 12:05:16 +01:00
accounts.email.accounts.cyplo = {
primary = true;
address = "cyplo@cyplo.dev";
2021-06-13 12:05:16 +01:00
aliases = [ "cyplo@cyplo.net" ];
realName = "Cyryl Płotnicki";
userName = "cyplo";
imap = {
host = "127.0.0.1";
port = 1143;
2021-12-26 15:32:54 +00:00
tls = {
enable = false;
useStartTls = false;
};
};
smtp = {
host = "127.0.0.1";
port = 1025;
tls.enable = false;
};
notmuch.enable = true;
2021-12-26 15:32:54 +00:00
himalaya.enable = true;
msmtp.enable = true;
passwordCommand = "${pkgs.pass}/bin/pass proton-bridge";
2021-08-01 07:58:21 +01:00
offlineimap.enable = true;
folders = {
2021-07-03 13:15:42 +01:00
drafts = "Drafts";
inbox = "INBOX";
sent = "Sent";
trash = "Trash";
};
};
programs.msmtp.enable = true;
2021-08-01 07:58:21 +01:00
programs.offlineimap.enable = true;
programs.notmuch = {
enable = true;
2021-08-01 07:58:21 +01:00
hooks.preNew = "${pkgs.offlineimap}/bin/offlineimap -o";
};
programs.alot = {
enable = true;
};
2021-08-01 07:58:21 +01:00
2021-12-26 15:32:54 +00:00
programs.himalaya = {
enable = true;
2021-12-26 15:32:54 +00:00
package = unstable.himalaya;
2021-06-13 12:05:16 +01:00
};
2021-12-26 15:32:54 +00:00
2021-06-13 12:05:16 +01:00
home.packages = with pkgs; [
hydroxide
];
systemd.user.services."hydroxide" = {
Unit.Description = "Bridge to ProtonMail";
Install.WantedBy = [ "default.target" ];
2021-12-26 15:32:54 +00:00
Service.ExecStart = "${unstable.hydroxide}/bin/hydroxide serve";
2021-06-13 12:05:16 +01:00
};
};
}