email: initial config

This commit is contained in:
Jez Cope 2021-09-10 12:43:08 +01:00
parent 64f109e335
commit 583eb67810
3 changed files with 51 additions and 0 deletions

View File

@ -49,6 +49,7 @@
# Users ####################################################################
users.users.jez = {
isNormalUser = true;
description = "Jez Cope";
group = "jez";
extraGroups = [ "wheel" "video" "audio" "networkmanager" ];
shell = pkgs.zsh;

View File

@ -0,0 +1,50 @@
{ config, lib, pkgs, nixosConfig, ... }:
let
params = import ../../../secrets/email.nix;
realName = nixosConfig.users.users.jez.description;
in {
accounts.email.accounts.main = rec {
primary = true;
inherit realName;
inherit (params.main) address userName passwordCommand aliases;
imap = {
inherit (params.main) host;
tls.useStartTls = true;
};
mu.enable = true;
mbsync = {
enable = true;
create = "both";
flatten = ".";
patterns = [ "*" ];
};
};
accounts.email.accounts.protonmail = rec {
inherit realName;
inherit (params.protonmail) address userName passwordCommand;
imap = {
host = "127.0.0.1";
port = 1143;
tls.enable = false;
};
mbsync = {
enable = false;
create = "maildir";
flatten = ".";
patterns = [ "INBOX" "Sent" "All Mail" ];
extraConfig.account = { Timeout = 300; };
};
};
programs.mu.enable = true;
programs.mbsync.enable = true;
services.mbsync = {
enable = true;
postExec = "${pkgs.mu}/bin/mu index";
};
}

BIN
secrets/email.nix Normal file

Binary file not shown.