refactor: major architectural restructure for theme-centric organization
Theme System: - Move all theme app configs to apps/ subdirectory (20 themes) - Add theme-loader.nix for dynamic theme config deployment - Simplify stylix.nix to focus on base theming only Override System: - Add overrides.nix for file-based config overrides - Add behavior-configs.nix for non-visual configuration - Split hypr/nomarchy.conf into behavior vs visual sections Module Improvements: - Add lib.mkDefault to all customizable settings - Add modules/lib/ with shared utilities and state schema - Update all home and system modules for downstream overridability Installer: - New minimal TTY installer (installer/install.sh) - Golden path: BTRFS + LUKS2 (disko-golden.nix) - New installer-iso.nix for TTY-only installation - Keep graphical installer as installerIsoGraphical option Cleanup: - Remove obsolete install.sh, disko-ext4.nix, install-nomarchy.sh - Update live-iso.nix references - Add .claude/ to .gitignore for local IDE settings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,37 +1,57 @@
|
||||
{ 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)
|
||||
# Stylix Integration Module
|
||||
#
|
||||
# This module handles base-level theming through Stylix:
|
||||
# - Color scheme injection from the active theme's palette
|
||||
# - Cursor configuration
|
||||
# - Font configuration
|
||||
# - GTK/GNOME theming
|
||||
#
|
||||
# App-specific theming is handled separately:
|
||||
# - theme-loader.nix: Deploys theme's apps/ configs (btop, neovim, etc.)
|
||||
# - waybar.nix: Generates waybar CSS from colorScheme
|
||||
# - hyprland.nix: Handles hyprland border colors
|
||||
#
|
||||
# Stylix targets disabled here (we have custom implementations):
|
||||
# - hyprland: Custom border/rule config
|
||||
# - waybar: Custom CSS with theme colors
|
||||
|
||||
# Map nix-colors palette to a format Stylix expects (attrset of hex strings)
|
||||
currentPalette = (palettes.${activeThemeName} or palettes.nord).palette;
|
||||
let
|
||||
nomarchyLib = import ../lib { inherit lib; };
|
||||
assetsPath = ../../assets/themes;
|
||||
|
||||
activeThemeName = config.nomarchy.theme;
|
||||
|
||||
# Use shared wallpaper resolver
|
||||
activeWallpaper = nomarchyLib.resolveWallpaper {
|
||||
wallpaperPath = config.nomarchy.wallpaper;
|
||||
themeName = activeThemeName;
|
||||
inherit assetsPath;
|
||||
};
|
||||
|
||||
# Get palette using shared library
|
||||
currentPalette = nomarchyLib.getPalette activeThemeName;
|
||||
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";
|
||||
enable = lib.mkDefault true;
|
||||
enableReleaseChecks = lib.mkDefault false;
|
||||
image = lib.mkDefault activeWallpaper;
|
||||
base16Scheme = lib.mkDefault currentPalette;
|
||||
|
||||
cursor = {
|
||||
# Use detected light mode state
|
||||
polarity = lib.mkDefault (if config.nomarchy.isLightMode then "light" else "dark");
|
||||
|
||||
cursor = lib.mkDefault {
|
||||
package = config.nomarchy.cursor.package;
|
||||
name = config.nomarchy.cursor.name;
|
||||
size = 24;
|
||||
};
|
||||
|
||||
fonts = {
|
||||
fonts = lib.mkDefault {
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
||||
name = config.nomarchy.fonts.monospace;
|
||||
@@ -57,7 +77,7 @@ in
|
||||
};
|
||||
|
||||
# Enable theming for specific targets
|
||||
targets = {
|
||||
targets = lib.mkDefault {
|
||||
hyprland.enable = false; # We keep our custom hyprland config for borders/rules
|
||||
waybar.enable = false; # We keep our custom waybar CSS
|
||||
alacritty.enable = true;
|
||||
@@ -69,8 +89,8 @@ in
|
||||
|
||||
# GTK Icon Theme configuration
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
enable = lib.mkDefault true;
|
||||
iconTheme = lib.mkDefault {
|
||||
package = pkgs.yaru-theme;
|
||||
name = config.nomarchy.iconsTheme;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user