mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-30 01:05:37 +00:00
89 lines
2.3 KiB
Nix
89 lines
2.3 KiB
Nix
{ config, pkgs, lib, ... }: {
|
|
|
|
options = {
|
|
mailServer = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = "Server name for the email address.";
|
|
};
|
|
};
|
|
|
|
config = {
|
|
|
|
home-manager.users.${config.user} = {
|
|
|
|
programs.himalaya = { enable = true; };
|
|
programs.mbsync = { enable = true; };
|
|
services.mbsync = {
|
|
enable = true;
|
|
frequency = "*:0/5";
|
|
};
|
|
|
|
accounts.email = {
|
|
maildirBasePath = "/home/${config.user}/mail";
|
|
accounts = {
|
|
home = let address = "${config.user}@${config.mailServer}";
|
|
in {
|
|
userName = address;
|
|
realName = config.fullName;
|
|
primary = true;
|
|
inherit address;
|
|
aliases = map (mailUser: "${mailUser}@${config.mailServer}") [
|
|
"me"
|
|
"hey"
|
|
"admin"
|
|
];
|
|
alot = { };
|
|
flavor = "plain";
|
|
folders = { };
|
|
getmail = { };
|
|
himalaya = {
|
|
enable = true;
|
|
settings = {
|
|
downloads-dir = config.userDirs.download;
|
|
smtp-insecure = true;
|
|
};
|
|
};
|
|
imap = {
|
|
host = "imap.purelymail.com";
|
|
port = 993;
|
|
tls.enable = true;
|
|
};
|
|
imapnotify = {
|
|
enable = false;
|
|
boxes = [ ];
|
|
onNotify = "";
|
|
onNotifyPost = "";
|
|
};
|
|
maildir = { path = "main"; };
|
|
mbsync = {
|
|
enable = true;
|
|
create = "maildir";
|
|
expunge = "none";
|
|
remove = "none";
|
|
patterns = [ "*" ];
|
|
extraConfig.channel = {
|
|
CopyArrivalDate = "yes"; # Sync time of original message
|
|
};
|
|
};
|
|
mu.enable = false;
|
|
notmuch.enable = false;
|
|
passwordCommand =
|
|
"${pkgs.age}/bin/age --decrypt --identity /home/${config.user}/.ssh/id_ed25519 ${
|
|
builtins.toString ./mailpass.age
|
|
}";
|
|
smtp = {
|
|
host = "smtp.purelymail.com";
|
|
port = 465;
|
|
tls.enable = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.fish.shellAbbrs = { hi = "himalaya"; };
|
|
|
|
};
|
|
|
|
};
|
|
}
|