2022-12-19 09:09:08 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
|
2022-03-10 12:25:23 +00:00
|
|
|
in {
|
2022-05-02 09:59:47 +01:00
|
|
|
home-manager.users.cyryl = {
|
2021-06-13 12:05:16 +01:00
|
|
|
accounts.email.accounts.cyplo = {
|
|
|
|
primary = true;
|
2021-06-13 17:43:51 +01:00
|
|
|
address = "cyplo@cyplo.dev";
|
2022-12-19 09:09:08 +00:00
|
|
|
aliases = ["cyplo@cyplo.net"];
|
2021-06-13 12:05:16 +01:00
|
|
|
realName = "Cyryl Płotnicki";
|
2022-01-08 10:23:29 +00:00
|
|
|
userName = "cyplo@cyplo.dev";
|
2021-06-13 17:43:51 +01:00
|
|
|
imap = {
|
|
|
|
host = "127.0.0.1";
|
|
|
|
port = 1143;
|
2021-12-26 15:32:54 +00:00
|
|
|
tls = {
|
2022-02-20 14:40:37 +00:00
|
|
|
enable = true;
|
|
|
|
useStartTls = true;
|
|
|
|
certificatesFile = "/home/cyryl/.config/protonmail/bridge/cert.pem";
|
2021-12-26 15:32:54 +00:00
|
|
|
};
|
2021-06-13 17:43:51 +01:00
|
|
|
};
|
|
|
|
smtp = {
|
|
|
|
host = "127.0.0.1";
|
|
|
|
port = 1025;
|
2022-01-08 10:23:29 +00:00
|
|
|
tls = {
|
2022-02-20 14:40:37 +00:00
|
|
|
enable = true;
|
|
|
|
useStartTls = true;
|
|
|
|
certificatesFile = "/home/cyryl/.config/protonmail/bridge/cert.pem";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
create = "maildir";
|
|
|
|
expunge = "maildir";
|
|
|
|
remove = "maildir";
|
|
|
|
};
|
|
|
|
msmtp = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = {
|
|
|
|
from = "cyplo@cyplo.dev";
|
|
|
|
auth = "plain";
|
2022-01-08 10:23:29 +00:00
|
|
|
};
|
2021-06-13 17:43:51 +01:00
|
|
|
};
|
|
|
|
notmuch.enable = true;
|
2022-02-20 14:40:37 +00:00
|
|
|
neomutt.enable = true;
|
2021-06-13 17:43:51 +01:00
|
|
|
passwordCommand = "${pkgs.pass}/bin/pass proton-bridge";
|
|
|
|
folders = {
|
2021-07-03 13:15:42 +01:00
|
|
|
drafts = "Drafts";
|
|
|
|
inbox = "INBOX";
|
|
|
|
sent = "Sent";
|
|
|
|
trash = "Trash";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-02-20 14:40:37 +00:00
|
|
|
programs.mbsync.enable = true;
|
2021-06-13 17:43:51 +01:00
|
|
|
programs.msmtp.enable = true;
|
2022-12-19 09:09:08 +00:00
|
|
|
programs.neomutt = {enable = true;};
|
2022-02-20 14:40:37 +00:00
|
|
|
programs.notmuch = {
|
2021-08-01 07:58:21 +01:00
|
|
|
enable = true;
|
2022-02-20 14:40:37 +00:00
|
|
|
hooks.preNew = "${pkgs.isync}/bin/mbsync -a";
|
2021-06-13 17:43:51 +01:00
|
|
|
};
|
2022-12-19 09:09:08 +00:00
|
|
|
programs.alot = {enable = true;};
|
2021-12-26 15:32:54 +00:00
|
|
|
|
2022-12-19 09:09:08 +00:00
|
|
|
home.packages = with pkgs; [unstable.protonmail-bridge];
|
2021-06-13 12:05:16 +01:00
|
|
|
|
2022-02-20 14:40:37 +00:00
|
|
|
services.mbsync.enable = true;
|
|
|
|
|
2022-03-27 10:28:47 +01:00
|
|
|
home.file.".mailcap".text = ''
|
|
|
|
text/html; ${pkgs.w3m}/bin/w3m -dump -o document_charset=%{charset} '%s'; nametemplate=%s.html; copiousoutput
|
|
|
|
'';
|
|
|
|
|
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";
|
2022-12-19 09:09:08 +00:00
|
|
|
Install.WantedBy = ["default.target" "mbsync.service"];
|
|
|
|
Service.ExecStart = "${unstable.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
|
2022-02-20 14:40:37 +00:00
|
|
|
Service.Environment = "PATH=${pkgs.pass}/bin:${pkgs.gnupg}/bin";
|
2021-06-13 12:05:16 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|