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:
@@ -1,11 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, ... }:
|
||||
|
||||
let
|
||||
stateFile = "${config.home.homeDirectory}/.config/home-manager/hyprsunset-state.json";
|
||||
hyprsunsetState = if builtins.pathExists stateFile then
|
||||
builtins.fromJSON (builtins.readFile stateFile)
|
||||
else { enabled = false; temperature = 4000; };
|
||||
temp = toString (if hyprsunsetState.enabled then hyprsunsetState.temperature else 6500);
|
||||
temp = toString (if config.nomarchy.toggles.nightlight then config.nomarchy.nightlightTemperature else 6500);
|
||||
in
|
||||
{
|
||||
services.hyprsunset = {
|
||||
|
||||
Reference in New Issue
Block a user