chore: split render function into eval and render functions

allows access to more data of a nixlet module
This commit is contained in:
technofab 2025-04-04 15:56:15 +02:00
parent cd8ed7719e
commit 0b7f99f81e

View file

@ -44,11 +44,9 @@ with lib; rec {
description ? "",
defaultProject ? null,
...
}: let
# TODO: just like with the values check the args here with the options system?
in {
}: rec {
inherit name version description path;
render = {
eval = {
system,
project ? defaultProject,
overrides ? ({...}: {}),
@ -59,8 +57,7 @@ with lib; rec {
nixletArg = {
inherit name project version description;
};
in
(kubenix.evalModules.${system} {
in (kubenix.evalModules.${system} {
module = {kubenix, ...}: {
imports = with kubenix.modules; [
k8s
@ -84,6 +81,15 @@ with lib; rec {
];
kubenix.project = project;
};
});
render = {
system,
project ? defaultProject,
overrides ? ({...}: {}),
values ? {},
}:
(eval {
inherit system project overrides values;
})
.config
.kubernetes