feat(core): migrate system state to unified declarative JSON
- Consolidate all configuration toggles (suspend, idle, waybar, etc.) into ~/.config/home-manager/state.json - Introduce nomarchy.toggles and nomarchy.hyprland options in Nix - Inject toggle states into all bin/ scripts via environment variables - Update toggle scripts to mutate JSON and trigger background rebuilds - Add a migration script to transition legacy flag files to the new format
This commit is contained in:
@@ -4,14 +4,9 @@ let
|
||||
# Re-use our state-based logic
|
||||
palettes = import ../../themes/nomarchy-palettes.nix;
|
||||
|
||||
themeStateFile = "${config.home.homeDirectory}/.config/home-manager/theme-state.nix";
|
||||
activeThemeName = if builtins.pathExists themeStateFile then
|
||||
lib.removeSuffix "\n" (builtins.readFile themeStateFile)
|
||||
else "nord";
|
||||
|
||||
wallpaperStateFile = "${config.home.homeDirectory}/.config/home-manager/wallpaper-state.nix";
|
||||
activeWallpaper = if builtins.pathExists wallpaperStateFile then
|
||||
lib.removeSuffix "\n" (builtins.readFile wallpaperStateFile)
|
||||
activeThemeName = config.nomarchy.theme;
|
||||
activeWallpaper = if config.nomarchy.wallpaper != "" then
|
||||
config.nomarchy.wallpaper
|
||||
else "${../../themes/catppuccin/backgrounds/1-totoro.png}"; # Fallback
|
||||
|
||||
# Map nix-colors palette to a format Stylix expects (attrset of hex strings)
|
||||
|
||||
Reference in New Issue
Block a user