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>
103 lines
3.4 KiB
Nix
103 lines
3.4 KiB
Nix
{ config, lib, ... }:
|
|
|
|
# File-based override system for Nomarchy
|
|
#
|
|
# Users can place config files in ~/.config/nomarchy/overrides/ to completely
|
|
# replace upstream defaults. Override priority (highest to lowest):
|
|
# 1. User Nix options
|
|
# 2. User file overrides (~/.config/nomarchy/overrides/)
|
|
# 3. Upstream defaults
|
|
#
|
|
# Supported override paths:
|
|
# - hypr/ - Hyprland configs (bindings.conf, input.conf, etc.)
|
|
# - waybar/ - Waybar config and style
|
|
# - alacritty/ - Alacritty terminal config
|
|
# - walker/ - Walker launcher config
|
|
# - kitty/ - Kitty terminal config
|
|
# - btop/ - Btop resource monitor config
|
|
# - apps/ - Other application configs
|
|
|
|
let
|
|
overridesDir = "${config.home.homeDirectory}/.config/nomarchy/overrides";
|
|
|
|
# Check if a specific override exists
|
|
hasOverride = path: builtins.pathExists "${overridesDir}/${path}";
|
|
|
|
# Get override source if it exists, otherwise use default
|
|
getOverrideOrDefault = { path, default }:
|
|
if hasOverride path
|
|
then "${overridesDir}/${path}"
|
|
else default;
|
|
|
|
in
|
|
{
|
|
options.nomarchy.overrides = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = "Whether to enable file-based override loading from ~/.config/nomarchy/overrides/";
|
|
};
|
|
|
|
paths = lib.mkOption {
|
|
type = lib.types.attrsOf lib.types.path;
|
|
default = {};
|
|
description = "Override paths discovered at build time. Populated by the override system.";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.nomarchy.overrides.enable {
|
|
# Create the overrides directory structure if it doesn't exist
|
|
home.activation.createOverridesDir = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
mkdir -p "${overridesDir}"
|
|
mkdir -p "${overridesDir}/hypr"
|
|
mkdir -p "${overridesDir}/waybar"
|
|
mkdir -p "${overridesDir}/apps"
|
|
'';
|
|
|
|
# Document the override system
|
|
xdg.configFile."nomarchy/overrides/README.md".text = lib.mkDefault ''
|
|
# Nomarchy Configuration Overrides
|
|
|
|
Place files in this directory to override upstream Nomarchy defaults.
|
|
|
|
## Directory Structure
|
|
|
|
```
|
|
overrides/
|
|
├── hypr/
|
|
│ ├── bindings.conf # Keybindings
|
|
│ ├── input.conf # Input settings
|
|
│ ├── monitors.conf # Monitor layout
|
|
│ ├── rules.conf # Window rules
|
|
│ └── autostart.conf # Startup apps
|
|
├── waybar/
|
|
│ ├── config.jsonc # Waybar layout
|
|
│ └── style.css # Waybar styling
|
|
├── apps/
|
|
│ ├── alacritty.toml # Terminal behavior
|
|
│ └── ...
|
|
└── README.md # This file
|
|
```
|
|
|
|
## Override Priority
|
|
|
|
1. **Nix Options** (highest) - Set in your flake/config
|
|
2. **File Overrides** - Files in this directory
|
|
3. **Upstream Defaults** (lowest) - Nomarchy defaults
|
|
|
|
## Usage
|
|
|
|
1. Copy the file you want to customize from the upstream config
|
|
2. Place it in the appropriate directory here
|
|
3. Edit to your preferences
|
|
4. Run `nixos-rebuild switch` or `home-manager switch`
|
|
|
|
## Tips
|
|
|
|
- For keybindings, copy `~/.config/hypr/bindings.conf` to `overrides/hypr/`
|
|
- For Waybar styling, copy `~/.config/waybar/style.css` to `overrides/waybar/`
|
|
- Changes here persist across Nomarchy updates
|
|
'';
|
|
};
|
|
}
|