mirror of
https://gitlab.com/TECHNOFAB/nixlets.git
synced 2025-12-10 09:00:06 +01:00
Nixlets - like Helm Charts or Grafana Tanka but instead using Nix. https://nixlets.projects.tf
| docs | ||
| lib | ||
| nixlets | ||
| template | ||
| .envrc | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| ci.nix | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
Nixlets
This repository contains utilities for creating Nixlets and a collection of Nixlets.
Nixlets are kinda like Helm Charts, but they are defined using Kubenix and the Nix language.
One can load Nixlets either via Nix Flakes or by fetching a tarball
Usage
Creating Nixlets
Nixlets need a default.nix and a values.nix (a nixlet.nix containing the metadata is also recommended).
Check out the existing nixlets to understand how they work.
There is also a bare-bones template.
Using/rendering Nixlets
To render nixlets you only need to import the nixlets-lib:
{
inputs.nixlet-lib.url = "gitlab:TECHNOFAB/nixlets?dir=lib";
}
Nixlets stored in the Gitlab Package Registry
(nixlet-lib.fetchNixletFromGitlab {
project = "TECHNOFAB/nixlets";
name = "<nixlet>";
version = "<version>";
sha256 = "<sha>";
}).render {
inherit system;
# values = {};
# project = "";
# overrides = ({...}: {});
}
Nixlets fetchable from arbitrary URLs
(nixlet-lib.fetchNixlet "<URL>" "<sha>").render {
# ...
}
Metadata
Metadata of the Nixlets can also easily be accessed if needed:
(<some nixlet>).description # version, name, etc.