profile: --profile / BUBBLEBOX_PROFILE — apply a profile in place #5

Merged
chad merged 1 commit from profile/explicit-path into master 2026-10-15 09:52:24 -04:00
Collaborator

Adds a global --profile <PATH> flag (also BUBBLEBOX_PROFILE) so a profile can live in a git checkout (e.g. a host repo) and be applied in place instead of being copied into ~/.config/bubblebox/.

  • PATH may be a profile.toml or the directory that holds it. An explicit path that doesn't exist is an error, with no silent fallback to the default.
  • The resolved path is canonicalized, so a symlinked ~/.config/bubblebox/profile.toml resolves files//units/ next to its target. Wrappers and devshells, which can't pass flags, see the same profile through the symlink.
  • profile.lock stays host state in config_dir. When the profile lives elsewhere, apply, generations switch and the no-change apply path mirror the lock next to profile.toml (the committed flake.lock analog). The mirror is best-effort and is only rewritten when it changes.
  • BUBBLEBOX_PROFILE is exported to children.

Consumer: cn glen/thinkpad-bubblebox-consumer, which drops the Justfile's install/rsync/copy-the-lock-back dance.

Verified: cargo test --workspace (124 pass, 3 new). Isolated-HOME functional runs covered --profile <dir>, the env var, and the symlinked default location (files resolved, lock mirrored, mirror restored on a no-change apply), plus a missing path giving exit 1. An end-to-end apply --refresh of rg+fd against the signed bees cache worked and rg --version ran. Clippy isn't in the rust:bookworm image, so it wasn't run.

Needs a release (v0.3.0) before the thinkpad pin can use it.

Adds a global `--profile <PATH>` flag (also `BUBBLEBOX_PROFILE`) so a profile can live in a git checkout (e.g. a host repo) and be applied in place instead of being copied into `~/.config/bubblebox/`. - PATH may be a `profile.toml` or the directory that holds it. An explicit path that doesn't exist is an error, with no silent fallback to the default. - The resolved path is canonicalized, so a symlinked `~/.config/bubblebox/profile.toml` resolves `files/`/`units/` next to its *target*. Wrappers and devshells, which can't pass flags, see the same profile through the symlink. - `profile.lock` stays host state in `config_dir`. When the profile lives elsewhere, `apply`, `generations switch` and the no-change apply path mirror the lock next to `profile.toml` (the committed `flake.lock` analog). The mirror is best-effort and is only rewritten when it changes. - `BUBBLEBOX_PROFILE` is exported to children. Consumer: cn `glen/thinkpad-bubblebox-consumer`, which drops the Justfile's `install`/`rsync`/copy-the-lock-back dance. **Verified:** `cargo test --workspace` (124 pass, 3 new). Isolated-HOME functional runs covered `--profile <dir>`, the env var, and the symlinked default location (files resolved, lock mirrored, mirror restored on a no-change apply), plus a missing path giving exit 1. An end-to-end `apply --refresh` of rg+fd against the signed bees cache worked and `rg --version` ran. Clippy isn't in the rust:bookworm image, so it wasn't run. Needs a release (v0.3.0) before the thinkpad pin can use it.
chad merged commit 5a3a6da1cf into master 2026-10-15 09:52:24 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chad/bubblebox!5
No description provided.