~cyplo/dotfiles

ref: 077d5b46ab8e0f39f9ff80865df09e222dc4d01a dotfiles/nixos/email-accounts.nix -rw-r--r-- 1.5 KiB
077d5b46 — Cyryl Płotnicki nvidia drivers for foureighty 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{ config, pkgs, ... }:
{
  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;
      };
      smtp = {
        host = "127.0.0.1";
        port = 1025;
        tls.enable = false;
      };
      notmuch.enable = true;
      astroid.enable = true;
      msmtp.enable = true;
      passwordCommand = "${pkgs.pass}/bin/pass proton-bridge";
      mbsync = {
        enable = true;
        create = "maildir";
      };
      folders = {
        drafts = "drafts";
        inbox = "inbox";
        sent = "sent";
        trash = "trash";
      };
    };

    programs.mbsync.enable = true;
    programs.msmtp.enable = true;

    programs.notmuch = {
      enable = true;
      hooks = {
        preNew = "mbsync --all";
      };
    };
    programs.astroid = {
      enable = true;
      pollScript = "${pkgs.notmuch}/bin/notmuch new";
      extraConfig = {
        attachments = {
          external_open_cmd = "${pkgs.xdg_utils}/bin/xdg-open";
        };
      };
    };
    programs.alot = {
      enable = true;
    };

    home.packages = with pkgs; [
      hydroxide
    ];

    systemd.user.services."hydroxide" = {
      Unit.Description = "Bridge to ProtonMail";
      Install.WantedBy = [ "default.target" ];
      Service.ExecStart = "${pkgs.hydroxide}/bin/hydroxide serve";
    };

  };
}