Machine profiles
One snapshot repository, several machines. A profile is a named subset of the repository’s selection policy, so a laptop and a workstation can share a repo without either one dragging in the other’s configuration.
rivet snapshot --profile laptoprivet restore --profile laptoprivet audit --profile laptoprivet tui --profile laptopWithout --profile, nothing changes: every selected group applies, exactly as
before v0.7.
Declaring them
Section titled “Declaring them”Profiles live in the repository’s rivet.toml, beside the selection policy
they narrow:
[profile.laptop]groups = ["shell-git", "kitty"]package_sources = ["pacman", "aur"]exclude_tracks = ["~/dev/big-datasets"]
[profile.workstation]groups = ["*"]| Field | Meaning | Empty means |
|---|---|---|
groups |
Configuration groups this machine takes. ["*"] is every selected group. |
No restriction |
package_sources |
Package manager ids this machine records and restores. | No restriction |
exclude_tracks |
[[track]] paths this machine skips, in any spelling rivet track accepts. |
Nothing excluded |
A profile can only narrow
Section titled “A profile can only narrow”This is the design rule, not an implementation detail: a profile may drop groups, package sources and tracked paths, but it can never add something the policy has not already approved.
The reviewable-approval property from v0.2 depends on it. rivet.toml’s
selection policy stays the single answer to “what may Rivet capture?”, and a
profile cannot become a back door that widens it. Listing a group in a profile
that the policy does not select simply has no effect.
Applying a profile produces an ordinary SelectionPolicy, so snapshot,
restore and audit stay profile-unaware — they receive an already-narrowed
policy rather than each reimplementing the filtering.
A typo is an error, not a no-op
Section titled “A typo is an error, not a no-op”unknown profile `laptip`; known profiles: laptop, workstationSilently ignoring an unrecognised --profile would run the command against
the full selection — precisely the outcome the flag was used to avoid. So an
unknown name fails, and the message lists what the repository actually
declares.
Restore and profiles
Section titled “Restore and profiles”A profile describes the machine, not the snapshot. Restoring a workstation
snapshot with --profile laptop gives you the laptop’s subset of it, which is
the point: you can capture on one machine and restore a narrowed version on
another.
--profile composes with the saved restore selection (rivet restore --select, or the TUI’s restore-plan screen). Both filters apply; an item must
survive each.
Known limitations
Section titled “Known limitations”- Profiles are not auto-detected. Rivet does not guess which machine it is
running on — you pass
--profileexplicitly, or you get the full policy. Hostname-based selection is deliberately not implemented: a wrong guess would silently capture or overwrite the wrong set of files. - There is no
rivet profilesubcommand yet. Profiles are edited inrivet.tomlby hand.