Documentation
¶
Overview ¶
Package templates gives limactl a directory of templates to read.
The templates are embedded in the binary. Lima needs real files, and it resolves `base:` and `file:` references relative to each template, so the whole tree is written once to ~/.cache/limabean/templates/<hash>/, named after a hash of its contents: a binary with different templates gets a fresh copy, and an unchanged one reuses it.
Index ¶
Constants ¶
const CorePack = "core"
CorePack is installed in every VM, by layer-base.yaml itself.
Variables ¶
This section is empty.
Functions ¶
func Envs ¶
Envs lists the environments in a templates root: built-in ones by name, and your own as written in your templates directory.
func Path ¶
Path returns the template file for an environment. Your own environment replaces a built-in one with the same name.
func ResolvePacks ¶ added in v0.1.4
ResolvePacks turns a default set and additions and removals into the sorted packs a VM gets (core isn't listed: every VM has it). Unknown names are an error that lists the known ones.
Types ¶
type Dirs ¶
type Dirs struct {
// Override is a templates directory to use instead of the embedded copy
// (--templates, for working on the templates themselves).
Override string
// User holds your own environments (~/.config/limabean/templates). Each
// <env>.yaml there can use the built-in layers: base: [./layer-base.yaml].
User string
// Cache is where the embedded copy is written (~/.cache/limabean/templates).
Cache string
}
Dirs locates templates.
type Pack ¶ added in v0.1.4
type Pack struct {
Name string
Description string // the TOML's first comment line
Tools []string // mise tools, as pinned
Apt []string // apt packages
TOML string // the file, as written into the VM
}
Pack is a set of tools a VM can get: a mise TOML (packs/<name>.toml), and optionally system packages (packs/<name>.apt, one per line).
func Packs ¶ added in v0.1.4
Packs returns the packs in root/packs and the user's own in root/user-packs (which win over built-in ones of the same name), by name.