Full replacement of the previous iteration, rebuilt around three ideas:
- Pure evaluation: theme-state.json lives inside the flake and is read
via the nomarchy.stateFile option — no --impure, ever.
- All-Home-Manager theming: `nomarchy-theme-sync apply` writes the JSON
and runs `home-manager switch`; every theme change is one atomic,
rollbackable generation. Wallpaper (swww) is the sole runtime piece.
- Flat, downstream-first layout: modules/{nixos,home} with one
options.nix each, exported as nixosModules/homeModules + overlay +
flake template; system (nixos-rebuild) and desktop (home-manager
switch) rebuild paths are fully split.
Ships 21 themes imported from the previous iteration (palettes,
wallpapers, btop themes, six whole-swap Waybar identities), Stylix for
the GTK/Qt/cursor long tail, a live ISO target with offline theme
switching, and docs/TESTING.md with the QEMU verification workflow.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
65 lines
2.9 KiB
Nix
65 lines
2.9 KiB
Nix
# User-level `nomarchy.*` options — the full surface downstream users
|
|
# configure in their home.nix. Kept small on purpose.
|
|
{ lib, pkgs, ... }:
|
|
|
|
{
|
|
options.nomarchy = {
|
|
# ── Required ───────────────────────────────────────────────────
|
|
stateFile = lib.mkOption {
|
|
type = lib.types.path;
|
|
example = lib.literalExpression "./theme-state.json";
|
|
description = ''
|
|
Path to theme-state.json, the single source of truth for all UI
|
|
configuration. Must live inside your flake (so evaluation stays
|
|
pure) and be git-tracked. nomarchy-theme-sync writes to the
|
|
on-disk copy; rebuilds bake it into the generation.
|
|
'';
|
|
};
|
|
|
|
# ── Preferences ────────────────────────────────────────────────
|
|
terminal = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "ghostty";
|
|
description = "Terminal emulator command, used by keybinds and $TERMINAL.";
|
|
};
|
|
|
|
package = lib.mkOption {
|
|
type = lib.types.package;
|
|
default = pkgs.nomarchy-theme-sync;
|
|
defaultText = lib.literalExpression "pkgs.nomarchy-theme-sync";
|
|
description = "The nomarchy-theme-sync package (provided by overlays.default).";
|
|
};
|
|
|
|
themesDir = lib.mkOption {
|
|
type = lib.types.path;
|
|
default = ../../themes;
|
|
defaultText = lib.literalExpression "\"\${nomarchy}/themes\"";
|
|
description = ''
|
|
Theme presets/assets directory probed at eval time for per-theme
|
|
app overrides (<slug>/waybar.css, <slug>/waybar.jsonc). Point it
|
|
at your own directory to ship custom layouts downstream.
|
|
'';
|
|
};
|
|
|
|
# ── Component toggles ──────────────────────────────────────────
|
|
hyprland.enable = lib.mkEnableOption "Nomarchy's Hyprland configuration" // { default = true; };
|
|
waybar.enable = lib.mkEnableOption "Nomarchy's Waybar configuration" // { default = true; };
|
|
ghostty.enable = lib.mkEnableOption "Nomarchy's Ghostty configuration" // { default = true; };
|
|
btop.enable = lib.mkEnableOption "btop with the per-theme nomarchy theme" // { default = true; };
|
|
stylix.enable = lib.mkEnableOption "Stylix theming for the long tail of apps (GTK, Qt, cursors)" // { default = true; };
|
|
|
|
# ── Computed (read-only) ───────────────────────────────────────
|
|
theme = lib.mkOption {
|
|
type = lib.types.attrs;
|
|
readOnly = true;
|
|
description = "The parsed theme state (stateFile merged over defaults).";
|
|
};
|
|
|
|
lib = lib.mkOption {
|
|
type = lib.types.attrs;
|
|
readOnly = true;
|
|
description = "Color-format helpers shared by the theme consumers.";
|
|
};
|
|
};
|
|
}
|