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:
@@ -2,11 +2,6 @@
|
||||
|
||||
let
|
||||
palettes = import ../../themes/nomarchy-palettes.nix;
|
||||
# Reads the state file. If it doesn't exist, defaults to nord.
|
||||
stateFile = "${config.home.homeDirectory}/.config/home-manager/theme-state.nix";
|
||||
activeThemeName = if builtins.pathExists stateFile then
|
||||
lib.removeSuffix "\n" (builtins.readFile stateFile)
|
||||
else "nord";
|
||||
userPackagesFile = "${config.home.homeDirectory}/.config/home-manager/user-packages.json";
|
||||
userPackages = if builtins.pathExists userPackagesFile then
|
||||
let
|
||||
@@ -20,6 +15,9 @@ in
|
||||
imports = [
|
||||
inputs.nix-colors.homeManagerModules.default
|
||||
inputs.walker.homeManagerModules.default
|
||||
./options.nix
|
||||
./state.nix
|
||||
./theme-files.nix
|
||||
./fonts.nix
|
||||
./alacritty.nix
|
||||
./nightlight.nix
|
||||
@@ -34,7 +32,7 @@ in
|
||||
./swayosd.nix
|
||||
];
|
||||
|
||||
colorScheme = palettes.${activeThemeName} or palettes.nord;
|
||||
colorScheme = palettes.${config.nomarchy.theme} or palettes.nord;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
|
||||
Reference in New Issue
Block a user