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,42 +1,43 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
palettes = import ../../assets/themes/nomarchy-palettes.nix;
|
||||
themeNames = builtins.attrNames palettes;
|
||||
themeList = builtins.concatStringsSep "\\n" themeNames;
|
||||
nomarchyLib = import ../lib { inherit lib; };
|
||||
themeList = builtins.concatStringsSep "\\n" nomarchyLib.themeNames;
|
||||
|
||||
nomarchy-theme-selector = pkgs.writeShellScriptBin "nomarchy-theme-selector" ''
|
||||
SELECTED_THEME=$(echo -e "${themeList}" | walker --dmenu)
|
||||
|
||||
|
||||
if [ -n "$SELECTED_THEME" ]; then
|
||||
nomarchy-theme-set "$SELECTED_THEME"
|
||||
fi
|
||||
'';
|
||||
|
||||
nomarchy-font-selector = pkgs.writeShellScriptBin "nomarchy-font-selector" ''
|
||||
STATE_DIR="${config.home.homeDirectory}/.config/home-manager"
|
||||
STATE_DIR="${config.home.homeDirectory}/.config/nomarchy"
|
||||
STATE_FILE="$STATE_DIR/state.json"
|
||||
|
||||
|
||||
mkdir -p "$STATE_DIR"
|
||||
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
|
||||
|
||||
|
||||
# Simple list of common nerd fonts, could be expanded
|
||||
FONTS="JetBrainsMono Nerd Font\nRobotoMono Nerd Font\nFiraCode Nerd Font\nUbuntuMono Nerd Font"
|
||||
SELECTED_FONT=$(echo -e "$FONTS" | walker --dmenu)
|
||||
|
||||
|
||||
if [ -n "$SELECTED_FONT" ]; then
|
||||
TMP_JSON=$(mktemp)
|
||||
jq ".font = \"$SELECTED_FONT\"" "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
|
||||
jq --arg font "$SELECTED_FONT" '.font = $font' "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
|
||||
env-update
|
||||
fi
|
||||
'';
|
||||
|
||||
nomarchy-wallpaper-selector = pkgs.writeShellScriptBin "nomarchy-wallpaper-selector" ''
|
||||
STATE_DIR="${config.home.homeDirectory}/.config/home-manager"
|
||||
STATE_DIR="${config.home.homeDirectory}/.config/nomarchy"
|
||||
STATE_FILE="$STATE_DIR/state.json"
|
||||
THEMES_DIR="${config.xdg.dataHome}/nomarchy/themes"
|
||||
|
||||
|
||||
mkdir -p "$STATE_DIR"
|
||||
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
|
||||
|
||||
|
||||
# List all images in all themes backgrounds
|
||||
# We search in the system-wide flake source for distro wallpapers to avoid Nix Store bloat
|
||||
WALLPAPERS=$(find "${config.xdg.dataHome}/nomarchy/themes" -type f \( -name "*.jpg" -o -name "*.png" \) 2>/dev/null)
|
||||
@@ -49,10 +50,10 @@ let
|
||||
WALLPAPERS="$WALLPAPERS\n$(find "${config.home.homeDirectory}/.config/nomarchy/themes" -type f \( -name "*.jpg" -o -name "*.png" \))"
|
||||
fi
|
||||
SELECTED_WP=$(echo -e "$WALLPAPERS" | walker --dmenu)
|
||||
|
||||
|
||||
if [ -n "$SELECTED_WP" ]; then
|
||||
TMP_JSON=$(mktemp)
|
||||
jq ".wallpaper = \"$SELECTED_WP\"" "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
|
||||
jq --arg wp "$SELECTED_WP" '.wallpaper = $wp' "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
|
||||
swww img "$SELECTED_WP" --transition-type outer --transition-pos 0.85,0.97 --transition-step 90 &
|
||||
env-update
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user