Keep the personal half of the desktop in one place, and ask before installing it

Agent instructions, skills, SSH host aliases and expansion triggers are worth
having identical on every machine one person owns, and belong in none of the
shared configuration. They live in user/ now, with a manifest saying where each
piece goes and a link-user stage that puts it there.

That stage does nothing unless the machine said yes. Somebody who clones Panama
to try the desktop keeps their own ~/.claude/CLAUDE.md exactly where it was;
the question names the destinations and defaults to no. Anything displaced goes
to config/old rather than being deleted.

~/.claude/CLAUDE.md and ~/.codex/AGENTS.md were byte-identical copies of one
file, which is the drift this exists to prevent.

Also adds the vitals toggles for the battery and Claude usage readouts, which
had preferences and no way to reach them.
This commit is contained in:
Gabriel Brown
2026-08-22 08:54:43 -04:00
parent 8b96d907a1
commit 89761a7da3
156 changed files with 16439 additions and 6 deletions
+29 -1
View File
@@ -191,6 +191,33 @@ if [[ -d "$extras_dir" ]]; then
fi
record PANAMA_EXTRAS "$extras"
# ── Personal content ─────────────────────────────────────────────────────────
#
# user/ holds whoever-owns-this-checkout's personal files: agent instructions,
# SSH host aliases, expansion triggers. Linking them is how one person keeps
# several machines identical, and it is exactly the wrong thing to do to
# somebody who just cloned this repository to try the desktop out.
#
# So it is asked rather than assumed, the question names what it would link,
# and no is the default. Someone who forks Panama replaces user/ with their own
# and starts answering yes.
user_content=no
if [[ -r "$(dirname "${BASH_SOURCE[0]}")/../../user/manifest" ]]; then
mapfile -t user_targets < <(
grep -vE '^\s*(#|$)' "$(dirname "${BASH_SOURCE[0]}")/../../user/manifest" \
| awk '{ print $3 }' | sort -u
)
if (( ${#user_targets[@]} > 0 )); then
printf 'This checkout carries personal content for: %s\n' "${user_targets[*]}"
printf 'Say no unless this checkout is yours.\n'
if yes_no "Link this checkout's personal content into your home?"; then
user_content=yes
fi
fi
fi
record PANAMA_USER_CONTENT "$user_content"
# ── Confirm ──────────────────────────────────────────────────────────────────
#
# The last chance to catch a typo before twenty minutes of package work that
@@ -210,7 +237,8 @@ gum style --border rounded --padding "0 1" "$(
printf 'Secure Boot %s\n' "$([[ -n "$mok_hash" ]] && echo "enroll a key" || echo "no change")"
printf 'Fedora apps %s\n' "$([[ "$debloat" == yes ]] && echo "remove ${installed[*]}" || echo "keep")"
printf 'Firmware %s\n' "$([[ "$firmware" == yes ]] && echo "update" || echo "no")"
printf 'Extras %s' "${extras:-none}"
printf 'Extras %s\n' "${extras:-none}"
printf 'Personal %s' "$([[ "$user_content" == yes ]] && echo "link user/ into home" || echo "not linked")"
)"
if ! gum confirm --default=true "Install with these answers?"; then