Nixlets - like Helm Charts or Grafana Tanka but instead using Nix. https://nixlets.projects.tf
Find a file
technofab a35b04034a refactor: split up into another flake to make import easier
allows users to use the nixlet dir as flake input, this way not all of
them have to be downloaded individually from GitLab's package registry
2024-11-24 17:24:35 +01:00
lib refactor(lib): simplify 2024-11-24 17:19:17 +01:00
nixlets refactor: split up into another flake to make import easier 2024-11-24 17:24:35 +01:00
template feat: rewrite how nixlets work 2024-05-08 17:09:17 +00:00
.envrc chore: add basic template and lib 2024-03-06 10:23:25 +00:00
.gitignore chore: add basic template and lib 2024-03-06 10:23:25 +00:00
.gitlab-ci.yml chore: add CI and fix attic nixlet 2024-03-09 15:32:47 +01:00
ci.nix refactor(flake): update, add treefmt, cleanup and import lib directly 2024-11-24 17:20:35 +01:00
flake.lock refactor(flake): update, add treefmt, cleanup and import lib directly 2024-11-24 17:20:35 +01:00
flake.nix refactor: split up into another flake to make import easier 2024-11-24 17:24:35 +01:00
README.md docs(README): update README for the new format, add better examples 2024-05-08 21:32:18 +02:00

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.