nix

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNixSystemDerivation

func GetNixSystemDerivation(host Host, resultPath string) (string, error)

func GetNixSystemPath

func GetNixSystemPath(host Host, resultPath string) (string, error)

func GetPathsToPush

func GetPathsToPush(host Host, resultPath string) (paths []string, err error)

func Push

func Push(ctx *ssh.SSHContext, host Host, paths ...string) (err error)

Types

type Deployment added in v1.6.0

type Deployment struct {
	Hosts []Host             `json:"hosts"`
	Meta  DeploymentMetadata `json:"meta"`
}

type DeploymentMetadata added in v1.6.0

type DeploymentMetadata struct {
	Description string
	Ordering    HostOrdering
}

type Host

type Host struct {
	PreDeployChecks         healthchecks.HealthChecks
	HealthChecks            healthchecks.HealthChecks
	Name                    string
	NixosRelease            string
	TargetHost              string
	TargetPort              int
	TargetUser              string
	Secrets                 map[string]secrets.Secret
	BuildOnly               bool
	SubstituteOnDestination bool
	NixConfig               map[string]string
	Tags                    []string
}

func (*Host) GetHealthChecks

func (host *Host) GetHealthChecks() healthchecks.HealthChecks

func (*Host) GetName added in v1.4.0

func (host *Host) GetName() string

func (*Host) GetPreDeployChecks added in v1.8.0

func (host *Host) GetPreDeployChecks() healthchecks.HealthChecks

func (*Host) GetTags added in v1.6.0

func (host *Host) GetTags() []string

func (*Host) GetTargetHost

func (host *Host) GetTargetHost() string

func (*Host) GetTargetPort added in v1.7.0

func (host *Host) GetTargetPort() int

func (*Host) GetTargetUser added in v1.4.0

func (host *Host) GetTargetUser() string

func (*Host) Reboot added in v1.2.0

func (host *Host) Reboot(sshContext *ssh.SSHContext) error

type HostOrdering added in v1.6.0

type HostOrdering struct {
	Tags []string
}

type NixBuildInvocationArgs added in v1.8.0

type NixBuildInvocationArgs struct {
	ArgsFile        string
	Attr            string
	DeploymentPath  string
	Names           []string
	NixArgs         []string
	NixBuildTargets string
	NixConfig       map[string]string
	NixContext      NixContext
	ResultLinkPath  string
}

func (*NixBuildInvocationArgs) ToNixBuildArgs added in v1.8.0

func (nArgs *NixBuildInvocationArgs) ToNixBuildArgs() []string

type NixContext added in v1.2.0

type NixContext struct {
	EvalCmd         string
	BuildCmd        string
	ShellCmd        string
	EvalMachines    string
	ShowTrace       bool
	KeepGCRoot      bool
	AllowBuildShell bool
}

func (*NixContext) BuildMachines added in v1.2.0

func (ctx *NixContext) BuildMachines(deploymentPath string, hosts []Host, nixArgs []string, nixBuildTargets string) (resultPath string, err error)

func (*NixContext) EvalHosts added in v1.7.0

func (ctx *NixContext) EvalHosts(deploymentPath string, attr string) (string, error)

func (*NixContext) GetBuildShell added in v1.5.0

func (ctx *NixContext) GetBuildShell(deploymentPath string) (buildShell *string, err error)

func (*NixContext) GetMachines added in v1.2.0

func (ctx *NixContext) GetMachines(deploymentPath string) (deployment Deployment, err error)

type NixEvalInvocationArgs added in v1.8.0

type NixEvalInvocationArgs struct {
	AsJSON         bool
	ArgsFile       string
	Attr           string
	DeploymentPath string
	NixContext     NixContext
	Strict         bool
	ReadWriteMode  bool
}

func (*NixEvalInvocationArgs) ToNixInstantiateArgs added in v1.8.0

func (nArgs *NixEvalInvocationArgs) ToNixInstantiateArgs() []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL