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

@@ -28,8 +28,7 @@ mkdir -p "$STATE_DIR"
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
# Persist the choice for the next rebuild.
TMP_JSON=$(mktemp)
jq --arg wp "$BACKGROUND" '.wallpaper = $wp' "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
nomarchy-state-write wallpaper "$BACKGROUND"
# Create symlink to the new background
ln -nsf "$BACKGROUND" "$CURRENT_BACKGROUND_LINK"