Major config overhaul: use custom modules, setup for multi-host config, and less boilerplate

This commit is contained in:
Emmet K
2025-02-09 16:50:26 -06:00
parent 1fa8b17b07
commit 0453901d17
303 changed files with 3560 additions and 5566 deletions

View File

@@ -0,0 +1,128 @@
[ColorEffects:Disabled]
Color=56,56,56
ColorAmount=0
ColorEffect=0
ContrastAmount=0.65
ContrastEffect=1
IntensityAmount=0.1
IntensityEffect=2
[ColorEffects:Inactive]
ChangeSelectionColor=true
Color=112,111,110
ColorAmount=0.025
ColorEffect=2
ContrastAmount=0.1
ContrastEffect=2
Enable=false
IntensityAmount=0
IntensityEffect=0
[Colors:Button]
BackgroundNormal={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
BackgroundAlternate={{base01-rgb-r}},{{base01-rgb-g}},{{base01-rgb-b}}
ForegroundNormal={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
DecorationFocus={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
DecorationHover={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
ForegroundActive={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundInactive={{base05-rgb-r}},{{base05-rgb-g}},{{base05-rgb-b}}
ForegroundLink={{base0C-rgb-r}},{{base0C-rgb-g}},{{base0C-rgb-b}}
ForegroundNegative={{base08-rgb-r}},{{base08-rgb-g}},{{base08-rgb-b}}
ForegroundNeutral={{base09-rgb-r}},{{base09-rgb-g}},{{base09-rgb-b}}
ForegroundNormal={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundPositive={{base0B-rgb-r}},{{base0B-rgb-g}},{{base0B-rgb-b}}
ForegroundVisited={{base0D-rgb-r}},{{base0D-rgb-g}},{{base0D-rgb-b}}
[Colors:Complementary]
BackgroundNormal={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
BackgroundAlternate={{base01-rgb-r}},{{base01-rgb-g}},{{base01-rgb-b}}
DecorationFocus={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
DecorationHover={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
ForegroundActive={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundInactive={{base05-rgb-r}},{{base05-rgb-g}},{{base05-rgb-b}}
ForegroundLink={{base0C-rgb-r}},{{base0C-rgb-g}},{{base0C-rgb-b}}
ForegroundNegative={{base08-rgb-r}},{{base08-rgb-g}},{{base08-rgb-b}}
ForegroundNeutral={{base09-rgb-r}},{{base09-rgb-g}},{{base09-rgb-b}}
ForegroundNormal={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundPositive={{base0B-rgb-r}},{{base0B-rgb-g}},{{base0B-rgb-b}}
ForegroundVisited={{base0D-rgb-r}},{{base0D-rgb-g}},{{base0D-rgb-b}}
[Colors:Selection]
BackgroundNormal={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
ForegroundNormal={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
BackgroundAlternate=255,0,0
DecorationFocus=0,255,0
DecorationHover=0,0,255
ForegroundActive={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundInactive={{base05-rgb-r}},{{base05-rgb-g}},{{base05-rgb-b}}
ForegroundLink={{base0C-rgb-r}},{{base0C-rgb-g}},{{base0C-rgb-b}}
ForegroundNegative={{base08-rgb-r}},{{base08-rgb-g}},{{base08-rgb-b}}
ForegroundNeutral={{base09-rgb-r}},{{base09-rgb-g}},{{base09-rgb-b}}
ForegroundNormal={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundPositive={{base0B-rgb-r}},{{base0B-rgb-g}},{{base0B-rgb-b}}
ForegroundVisited={{base0D-rgb-r}},{{base0D-rgb-g}},{{base0D-rgb-b}}
[Colors:Tooltip]
BackgroundAlternate={{base01-rgb-r}},{{base01-rgb-g}},{{base01-rgb-b}}
BackgroundNormal={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
DecorationFocus={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
DecorationHover={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
ForegroundActive={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundInactive={{base05-rgb-r}},{{base05-rgb-g}},{{base05-rgb-b}}
ForegroundLink={{base0C-rgb-r}},{{base0C-rgb-g}},{{base0C-rgb-b}}
ForegroundNegative={{base08-rgb-r}},{{base08-rgb-g}},{{base08-rgb-b}}
ForegroundNeutral={{base09-rgb-r}},{{base09-rgb-g}},{{base09-rgb-b}}
ForegroundNormal={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundPositive={{base0B-rgb-r}},{{base0B-rgb-g}},{{base0B-rgb-b}}
ForegroundVisited={{base0D-rgb-r}},{{base0D-rgb-g}},{{base0D-rgb-b}}
[Colors:View]
BackgroundAlternate={{base01-rgb-r}},{{base01-rgb-g}},{{base01-rgb-b}}
BackgroundNormal={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
DecorationFocus={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
DecorationHover={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
ForegroundActive={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundInactive={{base05-rgb-r}},{{base05-rgb-g}},{{base05-rgb-b}}
ForegroundLink={{base0C-rgb-r}},{{base0C-rgb-g}},{{base0C-rgb-b}}
ForegroundNegative={{base08-rgb-r}},{{base08-rgb-g}},{{base08-rgb-b}}
ForegroundNeutral={{base09-rgb-r}},{{base09-rgb-g}},{{base09-rgb-b}}
ForegroundNormal={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundPositive={{base0B-rgb-r}},{{base0B-rgb-g}},{{base0B-rgb-b}}
ForegroundVisited={{base0D-rgb-r}},{{base0D-rgb-g}},{{base0D-rgb-b}}
[Colors:Window]
BackgroundAlternate={{base01-rgb-r}},{{base01-rgb-g}},{{base01-rgb-b}}
BackgroundNormal={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
DecorationFocus={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
DecorationHover={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
ForegroundActive={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundInactive={{base05-rgb-r}},{{base05-rgb-g}},{{base05-rgb-b}}
ForegroundLink={{base0C-rgb-r}},{{base0C-rgb-g}},{{base0C-rgb-b}}
ForegroundNegative={{base08-rgb-r}},{{base08-rgb-g}},{{base08-rgb-b}}
ForegroundNeutral={{base09-rgb-r}},{{base09-rgb-g}},{{base09-rgb-b}}
ForegroundNormal={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
ForegroundPositive={{base0B-rgb-r}},{{base0B-rgb-g}},{{base0B-rgb-b}}
ForegroundVisited={{base0D-rgb-r}},{{base0D-rgb-g}},{{base0D-rgb-b}}
[General]
ColorScheme=Breeze
Name={{scheme-name}}
shadeSortColumn=true
desktopFont=Intel One Mono,12,-1,5,50,0,0,0,0,0
fixed=Intel One Mono,12,-1,5,50,0,0,0,0,0
font=Intel One Mono,12,-1,5,50,0,0,0,0,0
menuFont=Intel One Mono,12,-1,5,50,0,0,0,0,0
smallestReadableFont=Intel One Mono,10,-1,5,50,0,0,0,0,0
toolBarFont=Intel One Mono,10,-1,5,50,0,0,0,0,0
[KDE]
contrast=4
[WM]
activeFont=Intel One Mono,10,-1,5,50,0,0,0,0,0
activeBlend={{base01-rgb-r}},{{base01-rgb-g}},{{base01-rgb-b}}
activeBackground={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
activeForeground={{base07-rgb-r}},{{base07-rgb-g}},{{base07-rgb-b}}
inactiveBlend={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
inactiveBackground={{base00-rgb-r}},{{base00-rgb-g}},{{base00-rgb-b}}
inactiveForeground={{base01-rgb-r}},{{base01-rgb-g}},{{base01-rgb-b}}

View File

@@ -0,0 +1,127 @@
{ config, lib, pkgs, inputs, osConfig, ... }:
let
cfg = config.userSettings.stylix;
theme = import (./. + "../../../themes"+("/"+config.userSettings.stylix.theme));
in
{
options = {
userSettings.stylix = {
enable = lib.mkEnableOption "Enable stylix theming";
};
userSettings.stylix.theme = lib.mkOption {
default = if (osConfig.stylix.enable) then osConfig.systemSettings.stylix.theme else "io";
type = lib.types.enum (builtins.attrNames (lib.filterAttrs (name: type: type == "directory") (builtins.readDir ../../themes)));
description = "Theme for stylix to use for the user. A list of themes can be found in the `themes` directory.";
};
};
# for whatever reason, I can't import stylix hmModule if the nixosModule is imported
imports = lib.optionals (!osConfig.stylix.enable) [ inputs.stylix.homeManagerModules.stylix ];
config = lib.mkIf cfg.enable {
stylix.enable = true;
home.file.".currenttheme".text = config.userSettings.stylix.theme;
stylix.autoEnable = false;
stylix.polarity = theme.polarity;
stylix.image = pkgs.fetchurl {
url = theme.backgroundUrl;
sha256 = theme.backgroundSha256;
};
stylix.base16Scheme = theme;
stylix.fonts = {
# TODO abstract fonts into an option
monospace = {
name = "FiraCode Nerd Font";
package = pkgs.nerd-fonts.fira-code;
};
serif = {
name = "FiraCode Nerd Font";
package = pkgs.nerd-fonts.fira-code;
};
sansSerif = {
name = "FiraCode Nerd Font";
package = pkgs.nerd-fonts.fira-code;
};
emoji = {
name = "Noto Color Emoji";
package = pkgs.noto-fonts-emoji-blob-bin;
};
sizes = {
terminal = 18;
applications = 12;
popups = 12;
desktop = 12;
};
};
# move into alacritty config
stylix.targets.alacritty.enable = false;
programs.alacritty.settings = {
colors = {
# TODO revisit these color mappings
# these are just the default provided from stylix
# but declared directly due to alacritty v3.0 breakage
primary.background = "#"+config.lib.stylix.colors.base00;
primary.foreground = "#"+config.lib.stylix.colors.base07;
cursor.text = "#"+config.lib.stylix.colors.base00;
cursor.cursor = "#"+config.lib.stylix.colors.base07;
normal.black = "#"+config.lib.stylix.colors.base00;
normal.red = "#"+config.lib.stylix.colors.base08;
normal.green = "#"+config.lib.stylix.colors.base0B;
normal.yellow = "#"+config.lib.stylix.colors.base0A;
normal.blue = "#"+config.lib.stylix.colors.base0D;
normal.magenta = "#"+config.lib.stylix.colors.base0E;
normal.cyan = "#"+config.lib.stylix.colors.base0B;
normal.white = "#"+config.lib.stylix.colors.base05;
bright.black = "#"+config.lib.stylix.colors.base03;
bright.red = "#"+config.lib.stylix.colors.base09;
bright.green = "#"+config.lib.stylix.colors.base01;
bright.yellow = "#"+config.lib.stylix.colors.base02;
bright.blue = "#"+config.lib.stylix.colors.base04;
bright.magenta = "#"+config.lib.stylix.colors.base06;
bright.cyan = "#"+config.lib.stylix.colors.base0F;
bright.white = "#"+config.lib.stylix.colors.base07;
};
font.size = config.stylix.fonts.sizes.terminal;
font.normal.family = config.stylix.fonts.monospace.name;
};
# move into kitty config
stylix.targets.kitty.enable = true;
stylix.targets.gtk.enable = true;
home.file = {
".config/qt5ct/colors/oomox-current.conf".source = config.lib.stylix.colors {
template = builtins.readFile ./oomox-current.conf.mustache;
extension = ".conf";
};
".config/Trolltech.conf".source = config.lib.stylix.colors {
template = builtins.readFile ./Trolltech.conf.mustache;
extension = ".conf";
};
".config/kdeglobals".source = config.lib.stylix.colors {
template = builtins.readFile ./Trolltech.conf.mustache;
extension = "";
};
".config/qt5ct/qt5ct.conf".text = pkgs.lib.mkBefore (builtins.readFile ./qt5ct.conf);
};
home.packages = with pkgs; [
libsForQt5.qt5ct pkgs.libsForQt5.breeze-qt5 libsForQt5.breeze-icons pkgs.noto-fonts-monochrome-emoji
];
qt = {
enable = true;
style.package = pkgs.libsForQt5.breeze-qt5;
style.name = "breeze-dark";
platformTheme = "kde";
};
fonts.fontconfig.defaultFonts = {
monospace = [ config.stylix.fonts.monospace.name ];
sansSerif = [ config.stylix.fonts.sansSerif.name ];
serif = [ config.stylix.fonts.serif.name ];
};
};
}

View File

@@ -0,0 +1,5 @@
# FG BTN_BG bright less brdark less da txt fg br text btn fg txt bg bg shadow sel bg sel fg link visited alt bg default tooltip bg tooltip_fg
[ColorScheme]
active_colors=#{{base07-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base07-hex}}, #{{base07-hex}}, #{{base07-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base01-hex}}, #{{base00-hex}}, #{{base01-hex}}, #{{base07-hex}}, #{{base00-hex}}, #{{base07-hex}}, #{{base00-hex}}, #{{base07-hex}}
disabled_colors=#767081, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #767081, #767081, #767081, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base01-hex}}, #{{base00-hex}}, #{{base01-hex}}, #767081, #{{base00-hex}}, #767081, #{{base00-hex}}, #767081
inactive_colors=#{{base07-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base07-hex}}, #{{base07-hex}}, #{{base07-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base00-hex}}, #{{base01-hex}}, #{{base00-hex}}, #{{base01-hex}}, #{{base07-hex}}, #{{base00-hex}}, #{{base07-hex}}, #{{base00-hex}}, #{{base07-hex}}

View File

@@ -0,0 +1,35 @@
[Appearance]
color_scheme_path=~/.config/qt5ct/colors/oomox-current.conf
custom_palette=true
icon_theme=oomox-current
standard_dialogs=kde
style=Breeze
[Fonts]
fixed="Intel One Mono,12,-1,0,50,0,0,0,0,0"
general="Intel One Mono,12,-1,0,50,0,0,0,0,0"
[Interface]
activate_item_on_single_click=1
buttonbox_layout=2
cursor_flash_time=1000
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
#[PaletteEditor]
#geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x1t\0\0\x1\x83\0\0\x4\x7f\0\0\x4\x9c\0\0\x1t\0\0\x1\x83\0\0\x3\xea\0\0\x3\x93\0\0\0\0\x2\0\0\0\n\0\0\0\x1t\0\0\x1\x83\0\0\x4\x7f\0\0\x4\x9c)
#[SettingsWindow]
#geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x6\x9a\0\0\x5\x65\0\0\0\0\0\0\0\0\0\0\x2\xde\0\0\x2\xbb\0\0\0\0\x2\0\0\0\n\0\0\0\0\0\0\0\0\0\0\0\x6\x9a\0\0\x5\x65)
[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()