Skip to content

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.

Terminal window
rivet snapshot --profile laptop
rivet restore --profile laptop
rivet audit --profile laptop
rivet tui --profile laptop

Without --profile, nothing changes: every selected group applies, exactly as before v0.7.

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

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.

Terminal window
unknown profile `laptip`; known profiles: laptop, workstation

Silently 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.

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.

  • Profiles are not auto-detected. Rivet does not guess which machine it is running on — you pass --profile explicitly, 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 profile subcommand yet. Profiles are edited in rivet.toml by hand.