mirror of
https://gitlab.com/TECHNOFAB/nixlets.git
synced 2025-12-11 17:40:07 +01:00
style(README): format README.md
This commit is contained in:
parent
a35b04034a
commit
6815e95725
1 changed files with 7 additions and 1 deletions
|
|
@ -5,16 +5,18 @@ Nixlets are kinda like Helm Charts, but they are defined using Kubenix and the N
|
||||||
\
|
\
|
||||||
One can load Nixlets either via Nix Flakes or by fetching a tarball
|
One can load Nixlets either via Nix Flakes or by fetching a tarball
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Creating Nixlets
|
### Creating Nixlets
|
||||||
|
|
||||||
Nixlets need a `default.nix` and a `values.nix` (a `nixlet.nix` containing the metadata is also recommended). \
|
Nixlets need a `default.nix` and a `values.nix` (a `nixlet.nix` containing the metadata is also recommended). \
|
||||||
Check out the existing [nixlets](./nixlets/) to understand how they work. \
|
Check out the existing [nixlets](./nixlets/) to understand how they work. \
|
||||||
There is also a bare-bones [template](./template/).
|
There is also a bare-bones [template](./template/).
|
||||||
|
|
||||||
### Using/rendering Nixlets
|
### Using/rendering Nixlets
|
||||||
|
|
||||||
To render nixlets you only need to import the nixlets-lib:
|
To render nixlets you only need to import the nixlets-lib:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
inputs.nixlet-lib.url = "gitlab:TECHNOFAB/nixlets?dir=lib";
|
inputs.nixlet-lib.url = "gitlab:TECHNOFAB/nixlets?dir=lib";
|
||||||
|
|
@ -22,6 +24,7 @@ To render nixlets you only need to import the nixlets-lib:
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Nixlets stored in the Gitlab Package Registry
|
#### Nixlets stored in the Gitlab Package Registry
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
(nixlet-lib.fetchNixletFromGitlab {
|
(nixlet-lib.fetchNixletFromGitlab {
|
||||||
project = "TECHNOFAB/nixlets";
|
project = "TECHNOFAB/nixlets";
|
||||||
|
|
@ -37,6 +40,7 @@ To render nixlets you only need to import the nixlets-lib:
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Nixlets fetchable from arbitrary URLs
|
#### Nixlets fetchable from arbitrary URLs
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
(nixlet-lib.fetchNixlet "<URL>" "<sha>").render {
|
(nixlet-lib.fetchNixlet "<URL>" "<sha>").render {
|
||||||
# ...
|
# ...
|
||||||
|
|
@ -44,7 +48,9 @@ To render nixlets you only need to import the nixlets-lib:
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Metadata
|
#### Metadata
|
||||||
|
|
||||||
Metadata of the Nixlets can also easily be accessed if needed:
|
Metadata of the Nixlets can also easily be accessed if needed:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
(<some nixlet>).description # version, name, etc.
|
(<some nixlet>).description # version, name, etc.
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue