docs: document importing nixlets

This commit is contained in:
technofab 2026-02-09 19:42:17 +01:00
parent 2c21317f45
commit 906cd9db2d
Signed by: technofab
SSH key fingerprint: SHA256:bV4h88OqS/AxjbPn66uUdvK9JsgIW4tv3vwJQ8tpMqQ
3 changed files with 45 additions and 0 deletions

28
docs/importing.md Normal file
View file

@ -0,0 +1,28 @@
# Importing Nixlets
Nixlets can now define dependency Nixlets and handle them similarly to how nested
Helm Charts work.
## Importing
To define a dependency Nixlet, give it a name and pass the Nixlet as a value:
```nix title="default.nix of Nixlet"
nixlet.dependencies."postgres" = <any nixlet>;
```
`<any nixlet>` here could be stuff like `nixlet-lib.fetchNixletFromGitlab {...}`,
`nixlet-lib.fetchNixlet <url> <sha>`, etc.
## Defining Values
You can pre-define values for dependency Nixlets like this:
```nix title="values.nix of Nixlet"
options = {
# options for the current Nixlet
};
# overwriting the default of dependency Nixlets (the user can still overwrite this)
config."postgres".replicaCount = 10;
```