aboutsummaryrefslogtreecommitdiff
path: root/modules/email/default.nix
blob: 08a141f8f3f17854a9e99de65af1bc8299ec5493 (plain)
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
{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.modules.email;
in
{
  options.modules.email = {
    enable = lib.mkEnableOption "email";
  };

  config = lib.mkIf cfg.enable {
    accounts.email.accounts.personal = {
      address = "stefan@s00.xyz";
      primary = true;
      realName = "Stefan Weigl-Bosker";
      userName = "stefan@s00.xyz";
      passwordCommand = "${pkgs.pass}/bin/pass show email/stefan@s00.xyz";
      aerc = {
        enable = true;
        extraAccounts = {
          default = "INBOX";
        };
      };
      imap = {
        host = "imap.s00.xyz";
        port = 993;
        tls.enable = true;
      };
      smtp = {
        host = "smtp.s00.xyz";
        port = 465;
        tls.enable = true;
      };
      thunderbird.enable = true;
    };
  };
}