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

@ -29,6 +29,7 @@
passwordHash = passwordHash =
"$6$J15o3OLElCEncVB3$0FW.R7YFBMgtBp320kkZO.TdKvYDLHmnP6dgktdrVYCC3LUvzXj0Fj0elR/fXo9geYwwWi.EAHflCngL5T.3g/"; "$6$J15o3OLElCEncVB3$0FW.R7YFBMgtBp320kkZO.TdKvYDLHmnP6dgktdrVYCC3LUvzXj0Fj0elR/fXo9geYwwWi.EAHflCngL5T.3g/";
gitEmail = "7386960+nmasur@users.noreply.github.com"; gitEmail = "7386960+nmasur@users.noreply.github.com";
mailServer = "noahmasur.com";
gui = { gui = {
colorscheme = (import ./modules/colorscheme/gruvbox); colorscheme = (import ./modules/colorscheme/gruvbox);
wallpaper = ../../../downloads/nix.jpg; wallpaper = ../../../downloads/nix.jpg;

View File

@ -19,6 +19,7 @@ nixpkgs.lib.nixosSystem {
../../modules/desktop ../../modules/desktop
../../modules/shell ../../modules/shell
../../modules/gaming ../../modules/gaming
../../modules/mail/himalaya.nix
../../modules/services/keybase.nix ../../modules/services/keybase.nix
../../modules/services/gnupg.nix ../../modules/services/gnupg.nix
../../modules/applications/firefox.nix ../../modules/applications/firefox.nix

View File

@ -38,12 +38,13 @@
"extensions.pocket.enabled" = false; "extensions.pocket.enabled" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = "toolkit.legacyUserProfileCustomizations.stylesheets" =
true; # Allow userChrome.css true; # Allow userChrome.css
"layout.css.color-mix.enabled" = true;
}; };
userChrome = '' userChrome = ''
:root { :root {
--focus-outline-color: ${config.gui.colorscheme.base04} !important; --focus-outline-color: ${config.gui.colorscheme.base04} !important;
--toolbar-color: ${config.gui.colorscheme.base07} !important; --toolbar-color: ${config.gui.colorscheme.base07} !important;
--tab-min-height: 20px !important; --tab-min-height: 30px !important;
} }
/* Background of tab bar */ /* Background of tab bar */
.toolbar-items { .toolbar-items {
@ -53,12 +54,17 @@
.tabbrowser-tab .tab-stack { .tabbrowser-tab .tab-stack {
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
overflow: hidden; overflow: hidden;
background-color: ${config.gui.colorscheme.base00};
color: ${config.gui.colorscheme.base06} !important;
} }
.tab-content { .tab-content {
background-color: ${config.gui.colorscheme.base00} !important; border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 40%, transparent);
border-radius: 5px 5px 0 0;
background-color: ${config.gui.colorscheme.base00};
color: ${config.gui.colorscheme.base06} !important; color: ${config.gui.colorscheme.base06} !important;
} }
.tab-content[selected=true] { .tab-content[selected=true] {
border-bottom: 2px solid color-mix(in srgb, var(--identity-tab-color) 25%, transparent);
background-color: ${config.gui.colorscheme.base01} !important; background-color: ${config.gui.colorscheme.base01} !important;
color: ${config.gui.colorscheme.base07} !important; color: ${config.gui.colorscheme.base07} !important;
} }

View File

@ -158,7 +158,7 @@
"module/date" = { "module/date" = {
type = "internal/date"; type = "internal/date";
interval = 1; interval = 1;
date = "%l:%M %p"; date = "%d %b %l:%M %p";
date-alt = "%Y-%m-%d %H:%M:%S"; date-alt = "%Y-%m-%d %H:%M:%S";
label = "%date%"; label = "%date%";
label-foreground = config.gui.colorscheme.base0A; label-foreground = config.gui.colorscheme.base0A;

View File

@ -1,27 +1,77 @@
{ pkgs, lib, user, ... }: { { config, pkgs, lib, ... }: {
home-manager.users.${user} = { options = {
mailServer = lib.mkOption {
home.packages = with pkgs; [ himalaya ]; type = lib.types.str;
description = "Server name for the email address.";
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";
};
};
}; };
}; };
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"; };
};
};
} }

View File

@ -1,4 +1,4 @@
{ config, ... }: { { config, pkgs, ... }: {
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.gpg.enable = true; programs.gpg.enable = true;
@ -10,6 +10,7 @@
maxCacheTtlSsh = 34560000; # Can never reset maxCacheTtlSsh = 34560000; # Can never reset
pinentryFlavor = "tty"; pinentryFlavor = "tty";
}; };
home.packages = with pkgs; [ pinentry ];
}; };
} }

View File

@ -13,6 +13,15 @@
description = "Password created with mkpasswd -m sha-512"; description = "Password created with mkpasswd -m sha-512";
}; };
userDirs = {
# Required to prevent infinite recursion with himalaya
download = lib.mkOption {
type = lib.types.str;
description = "XDG directory for downloads";
default = "$HOME/downloads";
};
};
}; };
config = { config = {
@ -37,7 +46,7 @@
enable = true; enable = true;
createDirectories = true; createDirectories = true;
documents = "$HOME/documents"; documents = "$HOME/documents";
download = "$HOME/downloads"; download = config.userDirs.download;
music = "$HOME/media/music"; music = "$HOME/media/music";
pictures = "$HOME/media/images"; pictures = "$HOME/media/images";
videos = "$HOME/media/videos"; videos = "$HOME/media/videos";