Files
Nomarchy/modules/home/stylix.nix
2026-04-06 21:39:17 +01:00

79 lines
2.1 KiB
Nix

{ config, pkgs, inputs, lib, ... }:
let
# Re-use our state-based logic
palettes = import ../../assets/themes/nomarchy-palettes.nix;
activeThemeName = config.nomarchy.theme;
activeWallpaper = if config.nomarchy.wallpaper != "" then
# Use the absolute path from the state file (string format to avoid Nix Store copy)
config.nomarchy.wallpaper
else ../../assets/themes/catppuccin/backgrounds/1-totoro.png; # Fallback path object (copied to store)
# Map nix-colors palette to a format Stylix expects (attrset of hex strings)
currentPalette = (palettes.${activeThemeName} or palettes.nord).palette;
in
{
imports = [ inputs.stylix.homeModules.stylix ];
stylix = {
enable = true;
enableReleaseChecks = false;
image = activeWallpaper;
base16Scheme = currentPalette;
# Use detected light mode state
polarity = if config.nomarchy.isLightMode then "light" else "dark";
cursor = {
package = config.nomarchy.cursor.package;
name = config.nomarchy.cursor.name;
size = 24;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = config.nomarchy.fonts.monospace;
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
};
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
emoji = {
package = pkgs.noto-fonts-color-emoji;
name = "Noto Color Emoji";
};
sizes = {
applications = 11;
terminal = 11;
desktop = 11;
popups = 11;
};
};
# Enable theming for specific targets
targets = {
hyprland.enable = false; # We keep our custom hyprland config for borders/rules
waybar.enable = false; # We keep our custom waybar CSS
alacritty.enable = true;
kitty.enable = true;
gtk.enable = true;
gnome.enable = true;
};
};
# GTK Icon Theme configuration
gtk = {
enable = true;
iconTheme = {
package = pkgs.yaru-theme;
name = config.nomarchy.iconsTheme;
};
};
}