Documentation
¶
Overview ¶
Package resolve merges profile layers into an execution plan.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
Fingerprint returns a stable, human-readable string that identifies the current selection and the facts that produced it.
func PlanHash ¶ added in v0.9.0
PlanHash returns a stable short hash over the resolved plan's content (packages, tools, dotfiles, hooks, mounts, smb) AND the byte content of every dotfile source file. dotdrift persists it and, on the next apply, resets resume state when it differs — so editing a module's dotfiles/packages/hooks after a failed apply re-runs the affected steps instead of skipping them as "already complete". The selection fingerprint covers WHICH modules ran; PlanHash covers WHAT they resolved to, including in-place edits to a source file (same path, new content) that the plan struct alone would miss. Determinism: json.Marshal sorts map keys, and source contents are folded in entries sorted by (target, source). A marshal error (none expected for the data-only Plan types) or an unreadable source falls back to deterministic empty input, so a hash fault can only cause a spurious reset, never a missed one.
Types ¶
type DotfileEntry ¶
type DotfileEntry struct {
Target string
Source string
Mode string
Module string
Layer string
Scope string
}
DotfileEntry is a single resolved dotfile target.
type DotfilesStep ¶
type DotfilesStep struct {
Entries []DotfileEntry
}
DotfilesStep lists managed dotfile entries.
type HooksStep ¶
HooksStep lists the pre/post apply hook commands aggregated across all selected modules. Hooks are ordered sequences: per module the layers append base → host → user, and modules aggregate in selection order.
type MountEntry ¶ added in v0.2.0
type MountEntry struct {
Name string
Spec profile.MountSpec
Module string
Layer string
Scope string
}
MountEntry is a single resolved mount: the winning layer's MountSpec plus the provenance (module, winning layer, module scope) the apply steps need.
type MountsStep ¶ added in v0.2.0
type MountsStep struct {
Entries []MountEntry
}
MountsStep is the plan aggregate of mount entries across all selected modules, sorted by (Module, Name) for deterministic output.
type PackagesStep ¶
PackagesStep lists packages that should be present or removed from the system.
type Plan ¶
type Plan struct {
Packages PackagesStep
Tools ToolsStep
Dotfiles DotfilesStep
Hooks HooksStep
Mounts MountsStep
Smb SmbStep
}
Plan is the resolved, side-effect-free execution plan for a profile.
type SmbModuleSpec ¶ added in v0.2.0
SmbModuleSpec is one contributing module's merged smb spec. Modules lists which module contributed; the spec itself carries group/users/avahi and the merged shares. Sorted by Module for deterministic output.
type SmbStep ¶ added in v0.2.0
type SmbStep struct {
Modules []SmbModuleSpec
}
SmbStep aggregates each contributing module's merged smb spec. A module with no [smb] content in any layer contributes nothing.