Documentation ¶
Index ¶
- Variables
- func Arch() string
- func Hostname() (string, error)
- func MkdirAll(path string) error
- func Runtime() string
- func UserShell() (string, error)
- func Username() (string, error)
- func WriteSampleConfig(location, email, name string, force bool) error
- type Alias
- type Bling
- type Config
- func (c *Config) AddPackage(pack string) error
- func (c *Config) AddProgram(prog string) error
- func (c *Config) Clone(repo string) error
- func (c *Config) Eject() error
- func (c *Config) Location() (string, error)
- func (c *Config) MakeFlakeDir() error
- func (c *Config) RemovePackage(pack string) error
- func (c *Config) RemoveProgram(prog string) error
- func (c *Config) Save() error
- func (c *Config) UserFlakeDir() string
- func (c *Config) Validate() error
- type ConfigLine
- type GitConfig
- type Package
- type Program
- type System
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LowPackages = []string{"htop", "git", "github-cli", "glab"} DefaultPackages = []string{"fzf", "ripgrep", "vscode"} HighPackages = []string{"lazygit", "jq", "yq", "neovim", "neofetch", "btop", "cheat"} LowPrograms = []string{"starship"} DefaultPrograms = []string{"direnv"} HighPrograms = []string{"exa", "bat", "atuin", "zoxide"} )
View Source
var ( ErrMissingFlakeDir = errors.New("fleek.yml: missing `flakedir`") ErrInvalidShell = errors.New("fleek.yml: invalid shell, valid shells are: " + strings.Join(shells, ", ")) ErrInvalidBling = errors.New("fleek.yml: invalid bling level, valid levels are: " + strings.Join(blingLevels, ", ")) ErrorInvalidArch = errors.New("fleek.yml: invalid architecture, valid architectures are: " + strings.Join(architectures, ", ")) ErrInvalidOperatingSystem = errors.New("fleek.yml: invalid OS, valid operating systems are: " + strings.Join(operatingSystems, ", ")) ErrPackageNotFound = errors.New("package not found in configuration file") ErrProgramNotFound = errors.New("program not found in configuration file") )
View Source
var ErrSysNotFound = errors.New("system not found")
Functions ¶
func WriteSampleConfig ¶
WriteSampleConfig creates the first fleek configuration file
Types ¶
type Bling ¶
type Bling struct { Name string `yaml:"name"` Description string `yaml:"description"` Packages []string `yaml:"packages"` Programs []string `yaml:"programs"` PackageMap map[string]*Package ProgramMap map[string]*Program }
func DefaultBling ¶
type Config ¶
type Config struct { FlakeDir string `yaml:"flakedir"` Unfree bool `yaml:"unfree"` // bash or zsh Shell string `yaml:"shell"` // low, default, high Bling string `yaml:"bling"` Repository string `yaml:"repo"` Name string `yaml:"name"` Packages []string `yaml:",flow"` Programs []string `yaml:",flow"` Aliases map[string]string `yaml:",flow"` Paths []string `yaml:"paths"` Ejected bool `yaml:"ejected"` Systems []System `yaml:",flow"` }
Config holds the options that will be merged into the home-manager flake.
func ReadConfig ¶
ReadConfig returns the configuration data stored in $HOME/.fleek.yml
func (*Config) AddPackage ¶
func (*Config) AddProgram ¶
func (*Config) MakeFlakeDir ¶
MakeFlakeDir creates the directory that holds the interpolated flake.
func (*Config) RemovePackage ¶
func (*Config) RemoveProgram ¶
func (*Config) UserFlakeDir ¶
type ConfigLine ¶
ConfigLine represents a line of a program's configuration. It must be in the form of `key = value“ such that multiple config lines for the same program can be appended together to create a valid configuration.
type Program ¶
type Program struct { Name string `yaml:"name"` Description string `yaml:"description"` ConfigLines []ConfigLine `yaml:"config_lines,flow"` Aliases []Alias `yaml:",flow"` }
Program is an application that is installed and also has configuration attached.
func LoadPrograms ¶
Click to show internal directories.
Click to hide internal directories.