Documentation
¶
Index ¶
- func GetCurrentNixyProfile() string
- func InitNixyFile(ctx context.Context, dest string) error
- func ProfileCreate(ctx context.Context, name string) error
- func ProfileEdit(ctx context.Context, name string) error
- func ProfileList(ctx context.Context) ([]string, error)
- func XDGDataDir() string
- type BubbleWrap
- type Context
- type Docker
- type Executor
- type Nix
- type ParsedPackages
- type Profile
- type ShellContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentNixyProfile ¶
func GetCurrentNixyProfile() string
func ProfileCreate ¶
ProfileCreate creates a new profile with the given name
func ProfileEdit ¶
ProfileEdit opens the profile's flake.nix in the user's editor
func ProfileList ¶
ProfileList returns all available profiles
func XDGDataDir ¶
func XDGDataDir() string
Types ¶
type BubbleWrap ¶
type BubbleWrap struct {
ProfileFlakeDirMountedPath string
FakeHomeMountedPath string
NixDirMountedPath string
WorkspacesDirMountedPath string
StaticNixBinMountedPath string
// contains filtered or unexported fields
}
func UseBubbleWrap ¶
func UseBubbleWrap(profile *Profile) (*BubbleWrap, error)
type Docker ¶
type Executor ¶
type Executor string
func GetCurrentNixyExecutor ¶
func GetCurrentNixyExecutor() Executor
type Nix ¶
type Nix struct {
ConfigFile *string `json:"-"`
sync.Mutex `json:"-"`
Logger *slog.Logger `json:"-"`
NixPkgs string `json:"nixpkgs"`
Packages []string `json:"packages"`
Libraries []string `json:"libraries,omitempty"`
ShellHook string `json:"shellHook,omitempty"`
// contains filtered or unexported fields
}
func (*Nix) PrepareShellCommand ¶
func (*Nix) ProfileFlakeDir ¶
func (*Nix) SyncToDisk ¶
func (*Nix) WorkspaceFlakeDir ¶
type ParsedPackages ¶
type Profile ¶
type Profile struct {
Name string
NixPkgsCommitHash string `json:"nixpkgs,omitempty"`
ProfilePath string // ~/.local/share/nixy/profiles/<name>
ProfileFlakeDir string
FakeHomeDir string
WorkspacesDir string
NixDir string
StaticNixBinPath string // Path for static nix binary
}
Profile represents a general profile that all executors can use
func GetProfile ¶
func NewProfile ¶
NewProfile creates a new profile instance
func (*Profile) CreateDirs ¶
CreateDirs creates the necessary directories for the profile
Click to show internal directories.
Click to hide internal directories.