email: initial config
This commit is contained in:
parent
64f109e335
commit
583eb67810
|
@ -49,6 +49,7 @@
|
||||||
# Users ####################################################################
|
# Users ####################################################################
|
||||||
users.users.jez = {
|
users.users.jez = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
description = "Jez Cope";
|
||||||
group = "jez";
|
group = "jez";
|
||||||
extraGroups = [ "wheel" "video" "audio" "networkmanager" ];
|
extraGroups = [ "wheel" "video" "audio" "networkmanager" ];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
|
|
|
@ -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";
|
||||||
|
};
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in New Issue