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,22 +1,6 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
# Standardize state files to a common directory
|
||||
stateDir = "${config.home.homeDirectory}/.config/home-manager";
|
||||
fontStateFile = "${stateDir}/font-state.nix";
|
||||
activeFont = if builtins.pathExists fontStateFile then
|
||||
lib.removeSuffix "\n" (builtins.readFile fontStateFile)
|
||||
else "JetBrainsMono Nerd Font";
|
||||
in
|
||||
{
|
||||
options.nomarchy.fonts = {
|
||||
monospace = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = activeFont;
|
||||
description = "Monospace font for the system";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
fonts.fontconfig.enable = true;
|
||||
xdg.dataFile."fonts/nomarchy.ttf".source = ../../config/nomarchy.ttf;
|
||||
|
||||
Reference in New Issue
Block a user