lib: cleanup readme

This commit is contained in:
Johannes Kirschbauer
2025-09-16 15:39:31 +02:00
parent b1e3e3616e
commit a80df32c59

View File

@@ -4,9 +4,9 @@ This folder is supposed to contain clan specific nix functions.
Such as: Such as:
- build-clan function - clan function
- select - select
- build-inventory function - inventory function
- json-schema-converter - json-schema-converter
## Structure ## Structure
@@ -34,7 +34,7 @@ A single feature-set/module may be organized like this:
Every bigger feature should live in a subfolder with the feature name. Every bigger feature should live in a subfolder with the feature name.
It should contain two files: It should contain two files:
- `impl.nix` - `default.nix`
- `test.nix` - `test.nix`
- Everything else may be adopted as needed. - Everything else may be adopted as needed.
@@ -44,29 +44,19 @@ Example filetree
```sh ```sh
. .
├── default.nix ├── default.nix
├── build-clan ├── clan
│ ├── default.nix │ ├── default.nix
│ └── test.nix │ └── test.nix
└── inventory └── inventory
├── default.nix
├── services-subfeature ├── services-subfeature
│ ├── default.nix │ ├── default.nix
│ └── test.nix │ └── test.nix
├── instances-subfeature # <- We immediately see that this feature is not tested on itself. ├── instances-subfeature # <- We immediately see that this feature is not tested on itself.
│ └── default.nix │ └── default.nix
├── default.nix
└── test.nix └── test.nix
``` ```
```nix
# default.nix
{lib, clanLib, ...}:
{
inventory.resolveTags = import ./resolveTags { inherit lib clanLib; };
}
```
## Testing ## Testing
For testing we use [nix-unit](https://github.com/nix-community/nix-unit) For testing we use [nix-unit](https://github.com/nix-community/nix-unit)
TODO: define a helper that automatically hooks up `tests` in `flake.legacyPackages` and a corresponding buildable `checks` attribute