dotfiles/nixos/email-accounts.nix

69 lines
1.6 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";
2022-01-08 10:23:29 +00:00
userName = "cyplo@cyplo.dev";
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;
2022-01-08 10:23:29 +00:00
tls = {
enable = false;
useStartTls = 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; [
2022-01-08 10:23:29 +00:00
unstable.protonmail-bridge
2021-06-13 12:05:16 +01:00
];
2022-01-08 10:23:29 +00:00
systemd.user.services."proton-bridge" = {
2021-06-13 12:05:16 +01:00
Unit.Description = "Bridge to ProtonMail";
Install.WantedBy = [ "default.target" ];
2022-01-08 10:23:29 +00:00
Service.ExecStart = "${unstable.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
2021-06-13 12:05:16 +01:00
};
};
}