theme edits

This commit is contained in:
mjallen18
2025-10-24 09:58:33 -05:00
parent 1b125aecd0
commit 9582ca5392
26 changed files with 1488 additions and 726 deletions

View File

@@ -2,10 +2,11 @@
pkgs, pkgs,
lib, lib,
namespace, namespace,
config,
... ...
}: }:
let let
theme = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix"); theme = config.mjallen.theme.palette;
shellAliases = { shellAliases = {
update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3"; update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3";
update-switch = "sudo nixos-rebuild switch --max-jobs 10 --build-host admin@10.0.1.3"; update-switch = "sudo nixos-rebuild switch --max-jobs 10 --build-host admin@10.0.1.3";

View File

@@ -2,6 +2,7 @@
lib, lib,
pkgs, pkgs,
namespace, namespace,
config,
... ...
}: }:
let let
@@ -16,6 +17,7 @@ let
resolution = "3840x2160"; resolution = "3840x2160";
refreshRate = "240.00000"; refreshRate = "240.00000";
}; };
theme = config.mjallen.theme.palette;
in in
{ {
home.username = "matt"; home.username = "matt";
@@ -156,14 +158,14 @@ in
extraModulesStyle = '' extraModulesStyle = ''
#custom-lights { #custom-lights {
color: #88c0d0; color: ${theme.frost.nord8};
background-color: #2e3440; background-color: ${theme.polarNight.nord0};
opacity: 0.8; ${theme.defaultOpacity}
border-left: 5px solid #88c0d0; border-left: 5px solid ${theme.frost.nord8};
} }
#custom-lights:hover { #custom-lights:hover {
background: #4c566a; background: ${theme.polarNight.nord3};
} }
''; '';
}; };

View File

@@ -0,0 +1,140 @@
{ config, lib, ... }:
with lib;
let
cfg = config.mjallen.theme;
mkPalettePath = name:
lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/${name}.nix";
cap = s: let
len = builtins.stringLength s;
in
(lib.toUpper (builtins.substring 0 1 s))
+ (builtins.substring 1 (len - 1) s);
in
{
options.mjallen.theme = {
name = mkOption {
type = types.enum [ "nord" "dracula" "everforest" ];
default = "nord";
description = "Global theme palette name.";
};
# This is the palette file other modules should import.
# It exports a normalized schema with colors, tokens, and compat maps.
paletteFile = mkOption {
type = types.path;
default = mkPalettePath "nord";
description = "Path to a palette nix file exporting a normalized schema (and compat maps).";
};
# Exposed tokens (derived from paletteFile)
tokens = mkOption {
type = types.attrs;
default = { };
description = "Derived tokens from the selected palette (set automatically).";
};
# Expose the imported palette (actual colors + compat groups)
palette = mkOption {
type = types.attrs;
default = { };
description = "Imported palette attrset from the selected paletteFile (set automatically).";
};
gtk = {
enable = mkOption {
type = types.bool;
default = true;
description = "Manage GTK theme using global theme settings.";
};
# e.g. Colloid-Dark-Compact-*
color = mkOption {
type = types.enum [ "dark" "light" ];
default = "dark";
description = "GTK color variant.";
};
size = mkOption {
type = types.enum [ "standard" "compact" ];
default = "compact";
description = "GTK size variant.";
};
accent = mkOption {
type = types.enum [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ];
default = "all";
description = "GTK accent (Colloid themeVariants).";
};
tweak = mkOption {
type = types.enum [ "normal" "rimless" "float" "black" ];
default = "normal";
description = "GTK tweak (Colloid tweaks).";
};
themeName = mkOption {
type = types.nullOr types.str;
default = null;
description = "Explicit GTK theme name override. If null, computed from color/size/accent.";
};
};
icons = {
# Colloid icon scheme usually supports several named schemes. Default follows palette name.
scheme = mkOption {
type = types.enum [ "default" "nord" "dracula" "gruvbox" "everforest" "catppuccin" ];
default = cfg.name;
description = "Icon scheme to use (Colloid schemeVariants).";
};
variant = mkOption {
type = types.enum [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ];
default = "all";
description = "Icon variant (Colloid colorVariants).";
};
themeName = mkOption {
type = types.nullOr types.str;
default = null;
description = "Explicit icon theme name override. If null, computed from scheme/variant.";
};
};
};
# Wire derived defaults that depend on other options.
config = {
# Keep paletteFile following the chosen name unless user overrides it explicitly.
mjallen.theme.paletteFile = mkDefault (mkPalettePath cfg.name);
# Pull tokens directly from the palette file for convenience
mjallen.theme.tokens = mkDefault (
let pal = import cfg.paletteFile; in pal.tokens or { }
);
# Expose the imported palette for convenience
mjallen.theme.palette = mkDefault (import cfg.paletteFile);
# Default per-program palette path (can still be overridden per program)
mjallen.programs.waybar.theme.file = mkDefault cfg.paletteFile;
mjallen.programs.kitty.theme.file = mkDefault cfg.paletteFile;
mjallen.programs.mako.theme.file = mkDefault cfg.paletteFile;
mjallen.programs.wofi.theme.file = mkDefault cfg.paletteFile;
mjallen.programs.btop.theme.file = mkDefault cfg.paletteFile;
mjallen.programs.nwg-dock.theme.file = mkDefault cfg.paletteFile;
mjallen.programs.nwg-drawer.theme.file = mkDefault cfg.paletteFile;
mjallen.programs.wlogout.theme.file = mkDefault cfg.paletteFile;
# Computed GTK/Icon theme names if not overridden
_module.args.mjallenThemeComputed = {
gtkTheme =
if cfg.gtk.themeName != null then cfg.gtk.themeName
else "Colloid-${cap cfg.gtk.color}-${cap cfg.gtk.size}";
iconTheme =
if cfg.icons.themeName != null then cfg.icons.themeName
else "Colloid-${cap cfg.icons.scheme}-${cap cfg.gtk.color}";
};
};
}

View File

@@ -0,0 +1,90 @@
rec {
# Normalized semantic colors (theme-agnostic) - Dracula
colors = {
bg = "#282a36";
bgAlt = "#343746";
surface = "#343746";
surfaceAlt = "#44475a";
border = "#44475a";
text = "#f8f8f2";
textMuted = "#e2e2dc";
primary = "#6272a4"; # dark blue
info = "#8be9fd"; # cyan
accent = "#bd93f9"; # purple
success = "#50fa7b"; # green
warning = "#f1fa8c"; # yellow
danger = "#ff5555"; # red
};
# Shared styling tokens for CSS consumers
tokens = {
opacity = "opacity: 0.90;";
borderRadius = "border-radius: 0.8rem;";
centerOptions = ''
padding-top: 0.25rem;
padding-bottom: 0.25rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
'';
borderRight = ''
padding-top: 0.25rem;
padding-bottom: 0.25rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 0rem 0.8rem 0.8rem 0rem;
margin-right: 0.5rem;
'';
borderLeft = ''
padding-top: 0.25rem;
padding-bottom: 0.25rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 0.8rem 0rem 0rem 0.8rem;
margin-left: 0.5rem;
'';
};
# Legacy token aliases for back-compat
defaultOpacity = tokens.opacity;
defaultBorderRadius = tokens.borderRadius;
defaultCenterOptions = tokens.centerOptions;
borderRight = tokens.borderRight;
borderLeft = tokens.borderLeft;
# Back-compat: Nord-shaped groups for existing modules (approximate mappings)
polarNight = {
nord0 = "#282a36";
nord1 = "#343746";
nord2 = "#3b3e4a";
nord3 = "#44475a";
};
snowStorm = {
nord4 = "#e2e2dc";
nord5 = "#f1f1ea";
nord6 = "#f8f8f2";
};
frost = {
nord7 = "#50fa7b"; # using green as one of the frost group
nord8 = "#8be9fd"; # cyan
nord9 = "#6272a4"; # blue
nord10 = "#bd93f9"; # purple (as highlight)
};
aurora = {
nord11 = "#ff5555"; # red
nord12 = "#ffb86c"; # orange
nord13 = "#f1fa8c"; # yellow
nord14 = "#50fa7b"; # green
nord15 = "#bd93f9"; # magenta/purple
};
}

View File

@@ -0,0 +1,90 @@
rec {
# Normalized semantic colors (Everforest - Dark)
colors = {
bg = "#2b3339";
bgAlt = "#323c41";
surface = "#323c41";
surfaceAlt = "#3a444a";
border = "#414b51";
text = "#d3c6aa";
textMuted = "#9da9a0";
primary = "#7fbbb3"; # blue/aqua
info = "#83c092"; # teal
accent = "#d699b6"; # magenta
success = "#a7c080"; # green
warning = "#dbbc7f"; # yellow
danger = "#e67e80"; # red
};
# Shared styling tokens for CSS consumers
tokens = {
opacity = "opacity: 0.85;";
borderRadius = "border-radius: 1rem;";
centerOptions = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
'';
borderRight = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 0rem 1rem 1rem 0rem;
margin-right: 0.5rem;
'';
borderLeft = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 1rem 0rem 0rem 1rem;
margin-left: 0.5rem;
'';
};
# Legacy token aliases for back-compat
defaultOpacity = tokens.opacity;
defaultBorderRadius = tokens.borderRadius;
defaultCenterOptions = tokens.centerOptions;
borderRight = tokens.borderRight;
borderLeft = tokens.borderLeft;
# Back-compat: Nord-shaped groups for existing modules (approximate mappings)
polarNight = {
nord0 = "#2b3339";
nord1 = "#323c41";
nord2 = "#3a444a";
nord3 = "#414b51";
};
snowStorm = {
nord4 = "#c6d0b5";
nord5 = "#e0dcc7";
nord6 = "#d3c6aa";
};
frost = {
nord7 = "#a7c080"; # green
nord8 = "#83c092"; # teal
nord9 = "#7fbbb3"; # aqua/blue
nord10 = "#7fbbb3"; # reuse
};
aurora = {
nord11 = "#e67e80"; # red
nord12 = "#e69875"; # orange
nord13 = "#dbbc7f"; # yellow
nord14 = "#a7c080"; # green
nord15 = "#d699b6"; # magenta
};
}

View File

@@ -0,0 +1,90 @@
rec {
# Normalized semantic colors (theme-agnostic)
colors = {
bg = "#2e3440";
bgAlt = "#3b4252";
surface = "#3b4252";
surfaceAlt = "#434c5e";
border = "#4c566a";
text = "#eceff4";
textMuted = "#e5e9f0";
primary = "#5e81ac"; # blue
info = "#88c0d0"; # cyan/teal
accent = "#b48ead"; # purple
success = "#a3be8c"; # green
warning = "#ebcb8b"; # yellow
danger = "#bf616a"; # red
};
# Shared styling tokens for CSS consumers
tokens = {
opacity = "opacity: 0.85;";
borderRadius = "border-radius: 1rem;";
centerOptions = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
'';
borderRight = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 0rem 1rem 1rem 0rem;
margin-right: 0.5rem;
'';
borderLeft = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 1rem 0rem 0rem 1rem;
margin-left: 0.5rem;
'';
};
# Legacy token aliases for back-compat
defaultOpacity = tokens.opacity;
defaultBorderRadius = tokens.borderRadius;
defaultCenterOptions = tokens.centerOptions;
borderRight = tokens.borderRight;
borderLeft = tokens.borderLeft;
# Back-compat: Nord-shaped groups for existing modules
polarNight = {
nord0 = "#2e3440";
nord1 = "#3b4252";
nord2 = "#434c5e";
nord3 = "#4c566a";
};
snowStorm = {
nord4 = "#d8dee9";
nord5 = "#e5e9f0";
nord6 = "#eceff4";
};
frost = {
nord7 = "#8fbcbb";
nord8 = "#88c0d0";
nord9 = "#81a1c1";
nord10 = "#5e81ac";
};
aurora = {
nord11 = "#bf616a";
nord12 = "#d08770";
nord13 = "#ebcb8b";
nord14 = "#a3be8c";
nord15 = "#b48ead";
};
}

View File

@@ -2,7 +2,7 @@
with lib; with lib;
let let
cfg = config.mjallen.programs.btop; cfg = config.mjallen.programs.btop;
nord = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix"); palette = import cfg.theme.file;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];
@@ -10,7 +10,7 @@ in
programs.btop = { programs.btop = {
enable = true; enable = true;
settings = { settings = {
color_theme = "nord"; # todo color_theme = "global";
theme_background = true; theme_background = true;
truecolor = true; truecolor = true;
force_tty = false; force_tty = false;
@@ -76,49 +76,49 @@ in
log_level = "WARNING"; log_level = "WARNING";
}; };
themes = { themes = {
nord = '' global = ''
theme[main_bg]="${nord.polarNight.nord0}" theme[main_bg]="${palette.colors.bg}"
theme[main_fg]="${nord.snowStorm.nord6}" theme[main_fg]="${palette.colors.text}"
theme[title]="${nord.snowStorm.nord6}" theme[title]="${palette.colors.text}"
theme[hi_fg]="${nord.frost.nord7}" theme[hi_fg]="${palette.colors.info}"
theme[selected_bg]="${nord.polarNight.nord1}" theme[selected_bg]="${palette.colors.bgAlt}"
theme[selected_fg]="${nord.frost.nord7}" theme[selected_fg]="${palette.colors.info}"
theme[inactive_fg]="${nord.polarNight.nord2}" theme[inactive_fg]="${palette.colors.surfaceAlt}"
theme[graph_text]="${nord.snowStorm.nord6}" theme[graph_text]="${palette.colors.text}"
theme[meter_bg]="${nord.polarNight.nord1}" theme[meter_bg]="${palette.colors.bgAlt}"
theme[proc_misc]="${nord.snowStorm.nord6}" theme[proc_misc]="${palette.colors.text}"
theme[cpu_box]="${nord.aurora.nord15}" theme[cpu_box]="${palette.colors.accent}"
theme[mem_box]="${nord.aurora.nord14}" theme[mem_box]="${palette.colors.success}"
theme[net_box]="${nord.aurora.nord12}" theme[net_box]="${palette.colors.warning}"
theme[proc_box]="${nord.aurora.nord11}" theme[proc_box]="${palette.colors.danger}"
theme[div_line]="${nord.polarNight.nord1}" theme[div_line]="${palette.colors.bgAlt}"
theme[temp_start]="${nord.aurora.nord14}" theme[temp_start]="${palette.colors.success}"
theme[temp_mid]="${nord.aurora.nord13}" theme[temp_mid]="${palette.colors.warning}"
theme[temp_end]="${nord.aurora.nord11}" theme[temp_end]="${palette.colors.danger}"
theme[cpu_start]="${nord.aurora.nord15}" theme[cpu_start]="${palette.colors.accent}"
theme[cpu_mid]="${nord.aurora.nord12}" theme[cpu_mid]="${palette.colors.warning}"
theme[cpu_end]="${nord.aurora.nord11}" theme[cpu_end]="${palette.colors.danger}"
theme[free_start]="${nord.aurora.nord14}" theme[free_start]="${palette.colors.success}"
theme[free_mid]="${nord.aurora.nord13}" theme[free_mid]="${palette.colors.warning}"
theme[free_end]="${nord.aurora.nord12}" theme[free_end]="${palette.colors.warning}"
theme[cached_start]="${nord.aurora.nord14}" theme[cached_start]="${palette.colors.success}"
theme[cached_mid]="${nord.aurora.nord13}" theme[cached_mid]="${palette.colors.warning}"
theme[cached_end]="${nord.aurora.nord12}" theme[cached_end]="${palette.colors.warning}"
theme[available_start]="${nord.snowStorm.nord6}" theme[available_start]="${palette.colors.text}"
theme[available_mid]="${nord.aurora.nord11}" theme[available_mid]="${palette.colors.danger}"
theme[available_end]="${nord.aurora.nord11}" theme[available_end]="${palette.colors.danger}"
theme[used_start]="${nord.aurora.nord14}" theme[used_start]="${palette.colors.success}"
theme[used_mid]="${nord.aurora.nord13}" theme[used_mid]="${palette.colors.warning}"
theme[used_end]="${nord.aurora.nord11}" theme[used_end]="${palette.colors.danger}"
theme[download_start]="${nord.frost.nord8}" theme[download_start]="${palette.colors.info}"
theme[download_mid]="${nord.frost.nord8}" theme[download_mid]="${palette.colors.info}"
theme[download_end]="${nord.aurora.nord12}" theme[download_end]="${palette.colors.warning}"
theme[upload_start]="${nord.frost.nord7}" theme[upload_start]="${palette.colors.info}"
theme[upload_mid]="${nord.frost.nord7}" theme[upload_mid]="${palette.colors.info}"
theme[upload_end]="${nord.aurora.nord12}" theme[upload_end]="${palette.colors.warning}"
theme[process_start]="${nord.aurora.nord15}" theme[process_start]="${palette.colors.accent}"
theme[process_mid]="${nord.aurora.nord12}" theme[process_mid]="${palette.colors.warning}"
theme[process_end]="${nord.aurora.nord11}" theme[process_end]="${palette.colors.danger}"
''; '';
}; };
}; };

View File

@@ -3,5 +3,19 @@ with lib;
{ {
options.mjallen.programs.btop = { options.mjallen.programs.btop = {
enable = mkEnableOption "enable btop"; enable = mkEnableOption "enable btop";
theme = mkOption {
type = types.submodule {
options = {
file = mkOption {
type = types.path;
default = lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/nord.nix";
description = "Nix file exporting a palette attrset.";
};
};
};
default = { };
description = "btop theme palette configuration.";
};
}; };
} }

View File

@@ -8,7 +8,7 @@
}: }:
let let
isArm = ("aarch64-linux" == system) || ("aarch64-darwin" == system); isArm = ("aarch64-linux" == system) || ("aarch64-darwin" == system);
x86_only = with pkgs; [ x86_only = with pkgs; [
vscode-extensions.redhat.vscode-xml vscode-extensions.redhat.vscode-xml
]; ];

View File

@@ -7,7 +7,7 @@
with lib; with lib;
let let
cfg = config.mjallen.programs.hyprland; cfg = config.mjallen.programs.hyprland;
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${cfg.iconThemeName}"; drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${config.gtk.iconTheme.name}";
in in
{ {
imports = [ imports = [
@@ -80,9 +80,9 @@ in
CLUTTER_BACKEND = "wayland"; CLUTTER_BACKEND = "wayland";
EDITOR = "${cfg.defaultApps.editor.pname}"; EDITOR = "${cfg.defaultApps.editor.pname}";
VISUAL = "${cfg.defaultApps.visual.pname}"; VISUAL = "${cfg.defaultApps.visual.pname}";
ICON_THEME = cfg.iconThemeName; ICON_THEME = config.gtk.iconTheme.name;
GTK_CSD = "0"; GTK_CSD = "0";
GTK_THEME = cfg.gtkThemeName; GTK_THEME = config.gtk.theme.name;
GTK_USE_PORTAL = "1"; GTK_USE_PORTAL = "1";
HYPRCURSOR_THEME = config.home.pointerCursor.name; HYPRCURSOR_THEME = config.home.pointerCursor.name;
HYPRCURSOR_SIZE = config.home.pointerCursor.size; HYPRCURSOR_SIZE = config.home.pointerCursor.size;
@@ -354,30 +354,31 @@ in
] ]
++ cfg.keybinds.bindl; ++ cfg.keybinds.bindl;
monitor = cfg.monitor; monitor =
monitorv2 = map ( cfg.monitor
m: ++ map (
if m.disabled then m:
"${m.name}, disable" if m.disabled then
else if m.mirrorOf != null then "${m.name}, disable"
"${m.name}, mirror, ${m.mirrorOf}" else if m.mirrorOf != null then
else "${m.name}, mirror, ${m.mirrorOf}"
let else
mode = if m.mode == null then "preferred" else m.mode; let
position = if m.position == null then "auto" else m.position; mode = if m.mode == null then "preferred" else m.mode;
scale = if m.scale == null then "1" else (toString m.scale); position = if m.position == null then "0x0" else m.position;
transform = if m.transform == null then "auto" else m.transform; scale = if m.scale == null then "1" else (toString m.scale);
base = [ parts = [
m.name m.name
mode mode
position position
scale scale
transform ];
]; # Append transform only when set, as "transform, <value>"
line = builtins.concatStringsSep ", " (base ++ m.extra); transformTokens = if m.transform == null then [ ] else [ "transform" m.transform ];
in tokens = parts ++ transformTokens ++ m.extra;
line in
) cfg.monitorv2; builtins.concatStringsSep ", " tokens
) cfg.monitorv2;
render = { render = {
cm_fs_passthrough = 1; cm_fs_passthrough = 1;

View File

@@ -2,18 +2,20 @@
config, config,
lib, lib,
pkgs, pkgs,
mjallenThemeComputed,
... ...
}: }:
with lib; with lib;
let let
cfg = config.mjallen.programs.hyprland; cfg = config.mjallen.programs.hyprland;
themeSize = "compact"; # [ "standard" "compact" ] # Pull from global theme options
themeAccent = "all"; # [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ] themeSize = config.mjallen.theme.gtk.size; # "standard" | "compact"
themeVariant = "nord"; # [ "nord" "dracula" "gruvbox" "everforest" "catppuccin" "all" "black" "rimless" "normal" "float" ] themeAccent = config.mjallen.theme.gtk.accent; # "default" | ... | "all"
themeColor = "dark"; # [ "standard" "light" "dark" ] themeTweak = config.mjallen.theme.gtk.tweak; # "normal" | "rimless" | "float" | "black"
iconThemeVariant = "all"; # [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ] themeColor = config.mjallen.theme.gtk.color; # "light" | "dark"
iconScheme = "nord"; # [ "default" "nord" "dracula" "gruvbox" "everforest" "catppuccin" "all" ] iconThemeVariant = config.mjallen.theme.icons.variant; # "default" | ... | "all"
iconScheme = config.mjallen.theme.icons.scheme; # "default" | "nord" | "dracula" | ...
# Cursor # Cursor
cursorTheme = "macOS"; cursorTheme = "macOS";
@@ -21,16 +23,16 @@ let
cursorSize = 24; cursorSize = 24;
# GTK # GTK
gtkTheme = "Colloid-Dark-Compact-Nord"; gtkTheme = mjallenThemeComputed.gtkTheme;
gtkThemePkg = pkgs.colloid-gtk-theme.override { gtkThemePkg = pkgs.colloid-gtk-theme.override {
sizeVariants = [ themeSize ]; sizeVariants = [ themeSize ];
colorVariants = [ themeColor ]; colorVariants = [ themeColor ];
themeVariants = [ themeAccent ]; themeVariants = [ themeAccent ];
tweaks = [ themeVariant ]; tweaks = [ themeTweak ];
}; };
# Icons # Icons
iconTheme = "Colloid-Nord-Dark"; iconTheme = mjallenThemeComputed.iconTheme;
iconThemePkg = pkgs.colloid-icon-theme.override { iconThemePkg = pkgs.colloid-icon-theme.override {
schemeVariants = [ iconScheme ]; schemeVariants = [ iconScheme ];
colorVariants = [ iconThemeVariant ]; colorVariants = [ iconThemeVariant ];

View File

@@ -2,7 +2,7 @@
with lib; with lib;
let let
cfg = config.mjallen.programs.kitty; cfg = config.mjallen.programs.kitty;
nord = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix"); palette = import cfg.theme.file;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];
@@ -29,77 +29,77 @@ in
background_opacity = "0.85"; background_opacity = "0.85";
# The basic colors # The basic colors
foreground = nord.snowStorm.nord6; foreground = palette.colors.text;
background = nord.polarNight.nord0; background = palette.colors.bg;
selection_foreground = nord.polarNight.nord0; selection_foreground = palette.colors.bg;
selection_background = nord.aurora.nord15; selection_background = palette.colors.accent;
# Cursor colors # Cursor colors
cursor = nord.aurora.nord15; cursor = palette.colors.accent;
cursor_text_color = nord.polarNight.nord0; cursor_text_color = palette.colors.bg;
# URL underline color when hovering with mouse # URL underline color when hovering with mouse
url_color = nord.aurora.nord15; url_color = palette.colors.accent;
# Kitty window border colors # Kitty window border colors
active_border_color = nord.frost.nord10; active_border_color = palette.colors.primary;
inactive_border_color = nord.polarNight.nord1; inactive_border_color = palette.colors.bgAlt;
bell_border_color = nord.aurora.nord13; bell_border_color = palette.colors.warning;
# OS Window titlebar colors # OS Window titlebar colors
wayland_titlebar_color = nord.polarNight.nord0; wayland_titlebar_color = palette.colors.bg;
macos_titlebar_color = nord.polarNight.nord0; macos_titlebar_color = palette.colors.bg;
# Tab bar colors # Tab bar colors
active_tab_foreground = nord.polarNight.nord3; active_tab_foreground = palette.colors.border;
active_tab_background = nord.aurora.nord15; active_tab_background = palette.colors.accent;
inactive_tab_foreground = nord.snowStorm.nord6; inactive_tab_foreground = palette.colors.text;
inactive_tab_background = nord.polarNight.nord1; inactive_tab_background = palette.colors.bgAlt;
tab_bar_background = nord.polarNight.nord3; tab_bar_background = palette.colors.border;
# Colors for marks (marked text in the terminal) # Colors for marks (marked text in the terminal)
mark1_foreground = nord.polarNight.nord0; mark1_foreground = palette.colors.bg;
mark1_background = nord.frost.nord10; mark1_background = palette.colors.primary;
mark2_foreground = nord.polarNight.nord0; mark2_foreground = palette.colors.bg;
mark2_background = nord.aurora.nord15; mark2_background = palette.colors.accent;
mark3_foreground = nord.polarNight.nord0; mark3_foreground = palette.colors.bg;
mark3_background = nord.frost.nord8; mark3_background = palette.colors.info;
# The 16 terminal colors # The 16 terminal colors
# black # black
color0 = nord.polarNight.nord0; color0 = palette.colors.bg;
# Autosuggestion # Autosuggestion
color8 = nord.frost.nord10; color8 = palette.colors.primary;
# red # red
color1 = nord.aurora.nord11; color1 = palette.colors.danger;
color9 = nord.aurora.nord11; color9 = palette.colors.danger;
# green # green
color2 = nord.aurora.nord14; color2 = palette.colors.success;
color10 = nord.aurora.nord14; color10 = palette.colors.success;
# yellow # yellow
color3 = nord.aurora.nord13; color3 = palette.colors.warning;
color11 = nord.aurora.nord13; color11 = palette.colors.warning;
# blue # blue
color4 = nord.frost.nord10; color4 = palette.colors.primary;
color12 = nord.frost.nord10; color12 = palette.colors.primary;
# magenta # magenta
color5 = nord.aurora.nord15; color5 = palette.colors.accent;
color13 = nord.aurora.nord15; color13 = palette.colors.accent;
# cyan # cyan
color6 = nord.frost.nord8; color6 = palette.colors.info;
color14 = nord.frost.nord8; color14 = palette.colors.info;
# white # white
color7 = nord.snowStorm.nord5; color7 = palette.colors.textMuted;
color15 = nord.snowStorm.nord4; color15 = palette.colors.text;
}; };
}; };
}; };

View File

@@ -22,8 +22,18 @@ in
}; };
theme = mkOption { theme = mkOption {
type = types.attrs; type = types.submodule {
default = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix"); options = {
file = mkOption {
type = types.path;
# Fallback default; global theme module sets this via mkDefault
default = lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/nord.nix";
description = "Nix file exporting a palette attrset.";
};
};
};
default = { };
description = "Kitty theme palette configuration.";
}; };
}; };
} }

View File

@@ -2,7 +2,7 @@
with lib; with lib;
let let
cfg = config.mjallen.programs.mako; cfg = config.mjallen.programs.mako;
nord = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix"); palette = import cfg.theme.file;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];
@@ -22,10 +22,10 @@ in
max-icon-size = 64; max-icon-size = 64;
default-timeout = 5000; default-timeout = 5000;
background-color = nord.polarNight.nord0; background-color = palette.colors.bg;
text-color = nord.snowStorm.nord6; text-color = palette.colors.text;
border-color = nord.frost.nord10; border-color = palette.colors.primary;
progress-color = "over ${nord.frost.nord8}"; progress-color = "over ${palette.colors.info}";
}; };
}; };
}; };

View File

@@ -8,5 +8,19 @@ with lib;
type = types.str; type = types.str;
default = "DejaVu Sans"; default = "DejaVu Sans";
}; };
theme = mkOption {
type = types.submodule {
options = {
file = mkOption {
type = types.path;
default = lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/nord.nix";
description = "Nix file exporting a palette attrset.";
};
};
};
default = { };
description = "Mako theme palette configuration.";
};
}; };
} }

View File

@@ -7,7 +7,7 @@
with lib; with lib;
let let
cfg = config.mjallen.programs.nwg-dock; cfg = config.mjallen.programs.nwg-dock;
nord = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix"); palette = import cfg.theme.file;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];
@@ -18,11 +18,11 @@ in
home.file = { home.file = {
".config/nwg-dock-hyprland/drawer.css".text = '' ".config/nwg-dock-hyprland/drawer.css".text = ''
window { window {
background: ${nord.polarNight.nord0}; background: ${palette.colors.bg};
border-radius: 10px; border-radius: 10px;
border-style: none; border-style: none;
border-width: 1px; border-width: 1px;
border-color: ${nord.aurora.nord15}b0 border-color: ${palette.colors.accent}b0
} }
#box { #box {
@@ -33,14 +33,14 @@ in
active { active {
/* This is to underline the button representing the currently active window */ /* This is to underline the button representing the currently active window */
border-bottom: solid 1px; border-bottom: solid 1px;
border-color: ${nord.aurora.nord14}1a border-color: ${palette.colors.success}1a
} }
button, image { button, image {
background: none; background: none;
border-style: none; border-style: none;
box-shadow: none; box-shadow: none;
color: ${nord.frost.nord10} color: ${palette.colors.primary}
} }
button { button {
@@ -52,7 +52,7 @@ in
} }
button:hover { button:hover {
background-color: ${nord.polarNight.nord0}1a; background-color: ${palette.colors.bg}1a;
border-radius: 2px; border-radius: 2px;
} }

View File

@@ -3,5 +3,19 @@ with lib;
{ {
options.mjallen.programs.nwg-dock = { options.mjallen.programs.nwg-dock = {
enable = mkEnableOption "enable nwg-dock"; enable = mkEnableOption "enable nwg-dock";
theme = mkOption {
type = types.submodule {
options = {
file = mkOption {
type = types.path;
default = lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/nord.nix";
description = "Nix file exporting a palette attrset.";
};
};
};
default = { };
description = "nwg-dock theme palette configuration.";
};
}; };
} }

View File

@@ -7,7 +7,7 @@
with lib; with lib;
let let
cfg = config.mjallen.programs.nwg-drawer; cfg = config.mjallen.programs.nwg-drawer;
nord = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix"); palette = import cfg.theme.file;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];
@@ -18,13 +18,13 @@ in
home.file = { home.file = {
".config/nwg-drawer/drawer.css".text = '' ".config/nwg-drawer/drawer.css".text = ''
window { window {
background-color: ${nord.polarNight.nord0}bf; background-color: ${palette.colors.bg}bf;
color: ${nord.snowStorm.nord5}00 color: ${palette.colors.textMuted}00
} }
/* search entry */ /* search entry */
entry { entry {
background-color: ${nord.polarNight.nord1}0f background-color: ${palette.colors.bgAlt}0f
} }
button, image { button, image {
@@ -33,7 +33,7 @@ in
} }
button:hover { button:hover {
background-color: ${nord.frost.nord10}1a background-color: ${palette.colors.primary}1a
} }
/* in case you wanted to give category buttons a different look */ /* in case you wanted to give category buttons a different look */
@@ -43,12 +43,12 @@ in
#pinned-box { #pinned-box {
padding-bottom: 5px; padding-bottom: 5px;
border-bottom: 1px dotted ${nord.polarNight.nord3} border-bottom: 1px dotted ${palette.colors.border}
} }
#files-box { #files-box {
padding: 5px; padding: 5px;
border: 1px dotted ${nord.polarNight.nord3}; border: 1px dotted ${palette.colors.border};
border-radius: 15px border-radius: 15px
} }
''; '';

View File

@@ -3,5 +3,19 @@ with lib;
{ {
options.mjallen.programs.nwg-drawer = { options.mjallen.programs.nwg-drawer = {
enable = mkEnableOption "enable nwg-drawer"; enable = mkEnableOption "enable nwg-drawer";
theme = mkOption {
type = types.submodule {
options = {
file = mkOption {
type = types.path;
default = lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/nord.nix";
description = "Nix file exporting a palette attrset.";
};
};
};
default = { };
description = "nwg-drawer theme palette configuration.";
};
}; };
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,69 +1,264 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
let
inherit (types) str int bool listOf attrs path nullOr submodule;
in
{ {
options.mjallen.programs.waybar = { options.mjallen.programs.waybar = {
enable = mkEnableOption "enable waybar"; enable = mkEnableOption "Waybar status bar";
# Legacy/compat options (kept for backwards compatibility)
layer = mkOption { layer = mkOption {
type = types.str; type = str;
default = "top"; default = "top";
description = "Waybar layer (compat). Prefer layout + feature flags.";
}; };
modules-right = mkOption { modules-right = mkOption {
type = with types; listOf str; type = listOf str;
default = [ ]; default = [ ];
description = "DEPRECATED: use layout.right.";
}; };
networkInterface = mkOption { networkInterface = mkOption {
type = types.str; type = str;
default = "wlan0"; default = "wlan0";
description = "DEPRECATED: use network.interface.";
}; };
extraModules = mkOption { extraModules = mkOption {
type = types.attrs; type = attrs;
default = { }; default = { };
description = "Extra settings bars at top-level (compat with older module).";
}; };
extraModulesStyle = mkOption { extraModulesStyle = mkOption {
type = types.str; type = str;
default = ""; default = "";
description = "Extra CSS appended (compat). Prefer extra.style.";
}; };
windowOffset = mkOption { windowOffset = mkOption {
type = types.int; type = int;
default = 4; default = 4;
description = "Right margin offset for the hyprland/window module (in rem).";
}; };
# Waybar modules config # Theme
# modules = mkOption { theme = mkOption {
# type = types.submodule { type = submodule {
# options = { options = {
# # Modules file = mkOption {
# window = mkOption { type = path;
# type = types.submodule { default = lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/nord.nix";
# options = { description = "Nix file exporting a palette attrset (e.g., Nord).";
# # Waybar Module CSS };
# margin-right = mkOption { };
# type = types.str; };
# default = "4"; default = { };
# }; description = "Theme configuration.";
# }; };
# };
# }; # Layout
# temperature = mkOption { layout = mkOption {
# type = types.submodule { type = submodule {
# options = { options = {
# # Waybar Module CSS left = mkOption {
# margin-right = mkOption { type = listOf str;
# type = types.str; default = [ "hyprland/workspaces" ];
# default = "4"; description = "Modules shown on the left.";
# }; };
# }; center = mkOption {
# }; type = listOf str;
# }; default = [ "hyprland/window" ];
# }; description = "Modules shown in the center.";
# }; };
# default = { }; right = mkOption {
# }; type = listOf str;
default = [
"tray"
"custom/left-end"
"temperature"
"temperature#gpu"
"keyboard-state#capslock"
"keyboard-state#numlock"
"wireplumber#sink"
"bluetooth"
"network"
"idle_inhibitor"
"custom/right-end"
"custom/left-end"
"clock"
"battery"
"custom/weather"
"custom/right-end"
];
description = "Modules shown on the right.";
};
};
};
default = { };
description = "Waybar module layout.";
};
# Network
network = mkOption {
type = submodule {
options = {
interface = mkOption {
type = str;
default = "wlan0";
description = "Primary network interface name.";
};
};
};
default = { };
description = "Network configuration.";
};
# Temperatures
temperature = mkOption {
type = submodule {
options = {
cpu = mkOption {
type = submodule {
options = {
hwmonPath = mkOption {
type = str;
default = "/sys/class/hwmon/hwmon4/temp1_input";
description = "CPU temperature hwmon path.";
};
};
};
default = { };
};
gpu = mkOption {
type = submodule {
options = {
enable = mkOption {
type = bool;
default = true;
description = "Enable GPU temperature module.";
};
hwmonPath = mkOption {
type = str;
default = "/sys/class/hwmon/hwmon0/temp1_input";
description = "GPU temperature hwmon path.";
};
};
};
default = { };
};
};
};
default = { };
description = "Temperature module configuration.";
};
# Features
features = mkOption {
type = submodule {
options = {
tray = mkOption {
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
default = { };
};
bluetooth = mkOption {
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
default = { };
};
idleInhibitor = mkOption {
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
default = { };
};
keyboardIndicators = mkOption {
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
default = { };
};
audio = mkOption {
type = submodule {
options = {
sink = mkOption {
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
default = { };
};
source = mkOption {
type = submodule { options = { enable = mkOption { type = bool; default = false; }; }; };
default = { };
};
};
};
default = { };
};
weather = mkOption {
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
default = { };
};
hass = mkOption {
type = submodule { options = { enable = mkOption { type = bool; default = false; }; }; };
default = { };
};
clock = mkOption {
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
default = { };
};
battery = mkOption {
type = submodule { options = { enable = mkOption { type = bool; default = true; }; }; };
default = { };
};
};
};
default = { };
description = "Toggle optional Waybar features.";
};
# Styling
style = mkOption {
type = submodule {
options = {
file = mkOption {
type = nullOr path;
default = null;
description = "Optional external CSS file to use instead of the inline style.";
};
fragmentsDir = mkOption {
type = nullOr path;
default = null;
description = "Optional directory of CSS fragments to append.";
};
};
};
default = { };
description = "Styling configuration.";
};
# Extra overrides
extra = mkOption {
type = submodule {
options = {
settings = mkOption {
type = attrs;
default = { };
description = "Extra settings merged into settings.mainBar.";
};
style = mkOption {
type = str;
default = "";
description = "Extra CSS appended to the computed style.";
};
};
};
default = { };
description = "Extra settings/style hooks.";
};
}; };
} }

View File

@@ -2,7 +2,7 @@
with lib; with lib;
let let
cfg = config.mjallen.programs.wlogout; cfg = config.mjallen.programs.wlogout;
nord = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix"); palette = import cfg.theme.file;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];
@@ -53,13 +53,13 @@ in
} }
window { window {
background-color: ${nord.polarNight.nord0}f0 background-color: ${palette.colors.bg}f0
} }
button { button {
margin: 8px; margin: 8px;
color: ${nord.frost.nord7}; color: ${palette.colors.info};
background-color: ${nord.polarNight.nord1}; background-color: ${palette.colors.bgAlt};
border-style: solid; border-style: solid;
border-width: 2px; border-width: 2px;
background-repeat: no-repeat; background-repeat: no-repeat;
@@ -70,8 +70,8 @@ in
button:active, button:active,
button:focus, button:focus,
button:hover { button:hover {
color: ${nord.frost.nord8}; color: ${palette.colors.info};
background-color: ${nord.polarNight.nord2}; background-color: ${palette.colors.surfaceAlt};
outline-style: none; outline-style: none;
} }

View File

@@ -8,5 +8,19 @@ with lib;
type = types.str; type = types.str;
default = "Deja Vu Sans"; default = "Deja Vu Sans";
}; };
theme = mkOption {
type = types.submodule {
options = {
file = mkOption {
type = types.path;
default = lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/nord.nix";
description = "Nix file exporting a palette attrset.";
};
};
};
default = { };
description = "wlogout theme palette configuration.";
};
}; };
} }

View File

@@ -2,7 +2,7 @@
with lib; with lib;
let let
cfg = config.mjallen.programs.wofi; cfg = config.mjallen.programs.wofi;
nord = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix"); palette = import cfg.theme.file;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];
@@ -20,9 +20,9 @@ in
window { window {
margin: 0px; margin: 0px;
padding: 10px; padding: 10px;
border: 0.16em solid ${nord.aurora.nord15}; border: 0.16em solid ${palette.colors.accent};
border-radius: 0.1em; border-radius: 0.1em;
background-color: ${nord.polarNight.nord0}; background-color: ${palette.colors.bg};
} }
/* Inner Box */ /* Inner Box */
@@ -30,7 +30,7 @@ in
margin: 5px; margin: 5px;
padding: 10px; padding: 10px;
border: none; border: none;
background-color: ${nord.polarNight.nord0}; background-color: ${palette.colors.bg};
} }
/* Outer Box */ /* Outer Box */
@@ -38,7 +38,7 @@ in
margin: 5px; margin: 5px;
padding: 10px; padding: 10px;
border: none; border: none;
background-color: ${nord.polarNight.nord0}; background-color: ${palette.colors.bg};
} }
/* Scroll */ /* Scroll */
@@ -46,7 +46,7 @@ in
margin: 0px; margin: 0px;
padding: 10px; padding: 10px;
border: none; border: none;
background-color: ${nord.polarNight.nord0}; background-color: ${palette.colors.bg};
} }
/* Input */ /* Input */
@@ -55,46 +55,46 @@ in
padding: 10px; padding: 10px;
border: none; border: none;
border-radius: 0.1em; border-radius: 0.1em;
color: ${nord.snowStorm.nord6}; color: ${palette.colors.text};
background-color: ${nord.polarNight.nord0}; background-color: ${palette.colors.bg};
} }
#input image { #input image {
border: none; border: none;
color: ${nord.aurora.nord11}; color: ${palette.colors.danger};
} }
#input * { #input * {
outline: 4px solid ${nord.aurora.nord11}!important; outline: 4px solid ${palette.colors.danger}!important;
} }
/* Text */ /* Text */
#text { #text {
margin: 5px; margin: 5px;
border: none; border: none;
color: ${nord.snowStorm.nord6}; color: ${palette.colors.text};
} }
#entry { #entry {
background-color: ${nord.polarNight.nord0}; background-color: ${palette.colors.bg};
} }
#entry arrow { #entry arrow {
border: none; border: none;
color: ${nord.aurora.nord15}; color: ${palette.colors.accent};
} }
/* Selected Entry */ /* Selected Entry */
#entry:selected { #entry:selected {
border: 0.11em solid ${nord.aurora.nord15}; border: 0.11em solid ${palette.colors.accent};
} }
#entry:selected #text { #entry:selected #text {
color: ${nord.frost.nord7}; color: ${palette.colors.info};
} }
#entry:drop(active) { #entry:drop(active) {
background-color: ${nord.aurora.nord15}!important; background-color: ${palette.colors.accent}!important;
} }
''; '';
}; };

View File

@@ -8,5 +8,19 @@ with lib;
type = types.str; type = types.str;
default = "Deja Vu Sans"; default = "Deja Vu Sans";
}; };
theme = mkOption {
type = types.submodule {
options = {
file = mkOption {
type = types.path;
default = lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/nord.nix";
description = "Nix file exporting a palette attrset.";
};
};
};
default = { };
description = "Wofi theme palette configuration.";
};
}; };
} }

View File

@@ -0,0 +1,42 @@
{ lib
, stdenv
, fetchFromGitHub
, pciutils
, bash
}:
stdenv.mkDerivation {
pname = "steamdeck-bios-manager";
version = "871dfd9900d2e130fd0276d1dfc00feab7bf5cac";
src = fetchFromGitHub {
owner = "ryanrudolfoba";
repo = "SteamDeck-BIOS-Manager";
rev = "871dfd9900d2e130fd0276d1dfc00feab7bf5cac";
sha256 = lib.fakeHash;
};
# shell scripts — no compilation
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp steamdeck-bios-manager.sh $out/bin/steamdeck-bios-manager
chmod +x $out/bin/steamdeck-bios-manager
'';
# runtime deps
propagatedBuildInputs = [
pciutils
bash
];
meta = with lib; {
description = "Manage BIOS for the Steam Deck (unlock, flash, backup, block updates)";
homepage = "https://github.com/ryanrudolfoba/SteamDeck-BIOS-Manager";
license = licenses.agpl3Only;
platforms = platforms.linux;
maintainers = [];
sourceProvenance = with sourceTypes; [ ];
};
}