feat: implement hybrid declarative state with automatic Nix sync
Some checks failed
Check / eval-and-lint (push) Has been cancelled

This commit is contained in:
Bernardo Magri
2026-05-31 20:09:12 +01:00
parent 624023c1d5
commit dc3346bc55
18 changed files with 182 additions and 48 deletions

View File

@@ -24,14 +24,8 @@ mkdir -p "$STATE_DIR"
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
if fc-list | grep -iq "$font_name"; then
TMP_JSON=$(mktemp)
jq --arg font "$font_name" '.font = $font' "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
echo "Font set to $font_name."
echo "NOTE: This change is TEMPORARY and will be lost on the next system rebuild."
echo "To make this font permanent, add the following to your /etc/nixos/home.nix:"
echo " nomarchy.fonts.monospace = \"$font_name\";"
echo ""
echo "Applying changes with nomarchy-env-update..."
nomarchy-state-write font "$font_name"
echo "Font set to $font_name. Applying changes with nomarchy-env-update..."
if [[ "$no_update" == "true" ]]; then
echo "Skipping nomarchy-env-update due to --no-update flag."