Documentation
¶
Index ¶
- Variables
- func IsDefault(path string) bool
- func OSExpandIfPossible(env, existingEnv map[string]string) map[string]string
- type Config
- func (c *Config) Env() map[string]string
- func (c *Config) Hash() (string, error)
- func (c *Config) IncludedPluginConfigs() []*plugin.Config
- func (c *Config) InitHook() *shellcmd.Commands
- func (c *Config) IsEnvsecEnabled() bool
- func (c *Config) LoadRecursive(lockfile *lock.File) error
- func (c *Config) NixPkgsCommitHash() string
- func (c *Config) PackageMutator() *configfile.PackagesMutator
- func (c *Config) Packages(includeRemovedTriggerPackages bool) []configfile.Package
- func (c *Config) Scripts() configfile.Scripts
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("no devbox config file found")
ErrNotFound occurs when Open or Find cannot find a devbox config file after searching a directory (and possibly its parent directories).
Functions ¶
Types ¶
type Config ¶
type Config struct { Root configfile.ConfigFile // contains filtered or unexported fields }
Config represents a base devbox.json as well as any included plugins it may have.
func DefaultConfig ¶
func DefaultConfig() *Config
func Find ¶
Find is like Open except it recursively searches up the directory tree, starting in path. It returns ErrNotFound if path is a valid directory and neither it nor any of its parents contain a config file.
Find stops searching as soon as it encounters a file with a well-known config name (such as devbox.json), even if that config fails to load.
func Open ¶
Open loads a Devbox config from a file or project directory. If path is a directory, Open looks for a well-known config name (such as devbox.json) within it. The error will be ErrNotFound if path is a valid directory without a config file.
Open does not recursively search outside of path. See Find to load a config by walking up the directory tree.
func (*Config) IncludedPluginConfigs ¶
func (*Config) IsEnvsecEnabled ¶
func (*Config) NixPkgsCommitHash ¶
func (*Config) PackageMutator ¶
func (c *Config) PackageMutator() *configfile.PackagesMutator
func (*Config) Packages ¶
func (c *Config) Packages( includeRemovedTriggerPackages bool, ) []configfile.Package
Returns all packages including those from included plugins. If includeRemovedTriggerPackages is true, then trigger packages that have been removed will also be returned. These are only used for built-ins (e.g. php) when the plugin creates a flake that is meant to replace the original package.
func (*Config) Scripts ¶
func (c *Config) Scripts() configfile.Scripts