nix
No long description provided.
Installation
dagger install github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7Entrypoint
Return Type
Nix !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | - | Image tag of nixos/nix image to use. |
| container | Container | - | Override the base container. Defaults to nixos/nix:<version>. |
| source | Directory | - | Workspace directory. Required by all flake-bound operations. |
| store | CacheVolume | - | CacheVolume backing /nix/store. Defaults to a shared `nix-store` volume. Pass `null` (or call withoutStore) for an ephemeral store. |
Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
func (m *MyModule) Example() *dagger.Nix {
return dag.
Nix()
}@function
def example() -> dagger.Nix:
return (
dag.nix()
)@func()
example(): Nix {
return dag
.nix()
}Entrypoint
Return Type
Result !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | No description provided |
| storePath | String ! | - | No description provided |
| exportedPath | String ! | - | No description provided |
Example
Function Result.Constructor is not accessible from the nix moduleFunction Result.Constructor is not accessible from the nix moduleFunction Result.Constructor is not accessible from the nix moduleFunction Result.Constructor is not accessible from the nix moduleEntrypoint
Return Type
Flake !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | No description provided |
| source | Directory | - | No description provided |
Example
Function Flake.Constructor is not accessible from the nix moduleFunction Flake.Constructor is not accessible from the nix moduleFunction Flake.Constructor is not accessible from the nix moduleFunction Flake.Constructor is not accessible from the nix moduleTypes
Nix 🔗
container() 🔗
The configured nix container.
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Nix().
Container()
}@function
def example() -> dagger.Container:
return (
dag.nix()
.container()
)@func()
example(): Container {
return dag
.nix()
.container()
}source() 🔗
The workspace directory (if any). Required by all flake-bound operations.
Return Type
Directory Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
sourcefunc (m *MyModule) Example() *dagger.Directory {
return dag.
Nix().
Source()
}@function
def example() -> dagger.Directory:
return (
dag.nix()
.source()
)@func()
example(): Directory {
return dag
.nix()
.source()
}store() 🔗
The nix store volume (if any).
Return Type
CacheVolume Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
storefunc (m *MyModule) Example() *dagger.CacheVolume {
return dag.
Nix().
Store()
}@function
def example() -> dagger.CacheVolume:
return (
dag.nix()
.store()
)@func()
example(): CacheVolume {
return dag
.nix()
.store()
}withSource() 🔗
Set or replace the workspace directory.
Return Type
Nix !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
with-source --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Nix {
return dag.
Nix().
WithSource(source)
}@function
def example(source: dagger.Directory) -> dagger.Nix:
return (
dag.nix()
.with_source(source)
)@func()
example(source: Directory): Nix {
return dag
.nix()
.withSource(source)
}withStore() 🔗
Replace the /nix/store CacheVolume. Useful for sharing or scoping the store across modules.
Return Type
Nix !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| volume | CacheVolume ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
with-store --volume VOLUME_NAMEfunc (m *MyModule) Example(volume *dagger.CacheVolume) *dagger.Nix {
return dag.
Nix().
WithStore(volume)
}@function
def example(volume: dagger.CacheVolume) -> dagger.Nix:
return (
dag.nix()
.with_store(volume)
)@func()
example(volume: CacheVolume): Nix {
return dag
.nix()
.withStore(volume)
}build() 🔗
Build the given flake attribute and return a Result facade for extracting the output.
Return Type
Result !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| attr | String | - | The flake attribute to build (e.g. "default", "packages.x86_64-linux.foo"). The leading `.#` is added automatically. |
Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
buildfunc (m *MyModule) Example() *dagger.NixResult {
return dag.
Nix().
Build()
}@function
def example() -> dagger.NixResult:
return (
dag.nix()
.build()
)@func()
example(): NixResult {
return dag
.nix()
.build()
}flake() 🔗
Operations on the flake itself: show, metadata, check, update.
Return Type
Flake ! Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
flakefunc (m *MyModule) Example() *dagger.NixFlake {
return dag.
Nix().
Flake()
}@function
def example() -> dagger.NixFlake:
return (
dag.nix()
.flake()
)@func()
example(): NixFlake {
return dag
.nix()
.flake()
}container() 🔗
The nix container with store and source configured.
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Nix().
Container()
}@function
def example() -> dagger.Container:
return (
dag.nix()
.container()
)@func()
example(): Container {
return dag
.nix()
.container()
}withoutStore() 🔗
Disable the persistent /nix/store cache. Subsequent operations use an ephemeral store that lives only for the container’s lifetime.
Return Type
Nix ! Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
without-storefunc (m *MyModule) Example() *dagger.Nix {
return dag.
Nix().
WithoutStore()
}@function
def example() -> dagger.Nix:
return (
dag.nix()
.without_store()
)@func()
example(): Nix {
return dag
.nix()
.withoutStore()
}eval() 🔗
Evaluate a nix installable (flake attribute path like “.#packages.x86_64-linux.foo.version”) or, with expression: true, a raw nix expression.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| target | String ! | - | No description provided |
| output | Enum | - | Output format. RAW is only valid for string-typed results. |
| expression | Boolean | - | Interpret target as a raw nix expression (passes --expr). |
Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
eval --target stringfunc (m *MyModule) Example(ctx context.Context, target string) string {
return dag.
Nix().
Eval(ctx, target)
}@function
async def example(target: str) -> str:
return await (
dag.nix()
.eval(target)
)@func()
async example(target: string): Promise<string> {
return dag
.nix()
.eval(target)
}Result 🔗
container() 🔗
The container after the build, with /nix/store populated.
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
build \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Nix().
Build().
Container()
}@function
def example() -> dagger.Container:
return (
dag.nix()
.build()
.container()
)@func()
example(): Container {
return dag
.nix()
.build()
.container()
}storePath() 🔗
The resolved /nix/store/- path of the build result.
Return Type
String ! Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
build \
store-pathfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Nix().
Build().
StorePath(ctx)
}@function
async def example() -> str:
return await (
dag.nix()
.build()
.store_path()
)@func()
async example(): Promise<string> {
return dag
.nix()
.build()
.storePath()
}file() 🔗
The build result as a File.
Return Type
File ! Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
build \
filefunc (m *MyModule) Example() *dagger.File {
return dag.
Nix().
Build().
File()
}@function
def example() -> dagger.File:
return (
dag.nix()
.build()
.file()
)@func()
example(): File {
return dag
.nix()
.build()
.file()
}directory() 🔗
The build result as a Directory.
Return Type
Directory ! Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
build \
directoryfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Nix().
Build().
Directory()
}@function
def example() -> dagger.Directory:
return (
dag.nix()
.build()
.directory()
)@func()
example(): Directory {
return dag
.nix()
.build()
.directory()
}Flake 🔗
update() 🔗
Run nix flake update and return a Changeset describing what changed in the workspace (typically just flake.lock).
Return Type
Changeset ! Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
flake \
updatefunc (m *MyModule) Example() *dagger.Changeset {
return dag.
Nix().
Flake().
Update()
}@function
def example() -> dagger.Changeset:
return (
dag.nix()
.flake()
.update()
)@func()
example(): Changeset {
return dag
.nix()
.flake()
.update()
}show() 🔗
Run nix flake show.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| output | Enum | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
flake \
showfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Nix().
Flake().
Show(ctx)
}@function
async def example() -> str:
return await (
dag.nix()
.flake()
.show()
)@func()
async example(): Promise<string> {
return dag
.nix()
.flake()
.show()
}metadata() 🔗
Run nix flake metadata.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| output | Enum | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
flake \
metadatafunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Nix().
Flake().
Metadata(ctx)
}@function
async def example() -> str:
return await (
dag.nix()
.flake()
.metadata()
)@func()
async example(): Promise<string> {
return dag
.nix()
.flake()
.metadata()
}check() 🔗
Run nix flake check.
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/nix@5f2dc1bd1014cf79757f4605f2f731ed962d4da7 call \
flake \
checkfunc (m *MyModule) Example() *dagger.Container {
return dag.
Nix().
Flake().
Check()
}@function
def example() -> dagger.Container:
return (
dag.nix()
.flake()
.check()
)@func()
example(): Container {
return dag
.nix()
.flake()
.check()
}