Nimi library functions
nimi.evalNimiModule
Evaluate a nimi module and return its config. This runs the module set
through lib.evalModules with the nimi module included so you get the
fully merged, validated configuration output.
Example
evalNimiModule {
settings.binName = "my-nimi";
}
Type
evalNimiModule :: AttrSet -> AttrSet
Arguments
- module
- A nimi module attrset.
nimi.toNimiJson
Render an evaluated config to validated JSON. The config is serialized,
formatted with jq, then validated by running nimi --config ... validate
so the resulting file is both pretty-printed and schema-checked.
Example
let cfg = evalNimiModule { settings.binName = "my-nimi"; };
in toNimiJson cfg
Type
toNimiJson :: AttrSet -> Path
Arguments
- evaluatedConfig
- The evaluated nimi config.
nimi.mkNimiBin
Build a wrapper binary for a given nimi module. This evaluates the module,
writes a validated JSON config, and emits a shell wrapper that runs nimi
with that config so consumers can execute it like a normal binary.
Example
mkNimiBin { settings.binName = "my-nimi"; }
Type
mkNimiBin :: AttrSet -> Derivation
Arguments
- module
- A nimi module attrset.
nimi.mkContainerImage
Build a container image for a given nimi module. This evaluates the module,
wires the container entrypoint to the wrapper binary, and uses
nix2container.buildImage when available (otherwise dockerTools.buildImage).
Example
mkContainerImage { settings.binName = "my-nimi"; }
Type
mkContainerImage :: AttrSet -> Derivation
Arguments
- module
- A nimi module attrset.