mail config and firefox container tabs

This commit is contained in:
Noah Masur
2022-05-10 23:45:50 -04:00
parent 852385ef4d
commit 5e6dd8c2b8
7 changed files with 96 additions and 28 deletions

View File

@ -1,27 +1,77 @@
{ pkgs, lib, user, ... }: {
{ config, pkgs, lib, ... }: {
home-manager.users.${user} = {
home.packages = with pkgs; [ himalaya ];
programs.himalaya = {
enable = true;
settings = {
name = "${name}";
downloads-dir = "~/Downloads";
home = {
default = true;
email = "censored";
imap-host = "censored";
imap-port = 993;
imap-login = "censored";
imap-passwd-cmd = "cat ~/.config/himalaya/passwd";
smtp-host = "censored";
smtp-port = 587;
smtp-login = "censored";
smtp-passwd-cmd = "cat ~/.config/himalaya/passwd";
};
};
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; };
accounts.email = {
maildirBasePath = "/home/${config.user}/mail";
accounts = {
main = let
address = "${config.user}@${config.mailServer}";
serverHostname = "mail.${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; };
};
imap = {
host = serverHostname;
port = 993;
tls.enable = true;
};
imapnotify = {
enable = false;
boxes = [ ];
onNotify = "";
onNotifyPost = "";
};
maildir = { path = "main"; };
mbsync = {
enable = false;
create = "maildir";
expunge = "none";
remove = "none";
patterns = [ "*" ];
};
mu.enable = false;
notmuch.enable = false;
passwordCommand =
"cat /home/${config.user}/.config/himalaya/passwd";
smtp = {
host = serverHostname;
port = 587;
tls.enable = true;
};
};
};
};
programs.fish.shellAbbrs = { hi = "himalaya"; };
};
};
}