feat: implement hybrid declarative state with automatic Nix sync
Some checks failed
Check / eval-and-lint (push) Has been cancelled
Some checks failed
Check / eval-and-lint (push) Has been cancelled
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user