mirror of
https://gitlab.com/TECHNOFAB/nixlets.git
synced 2025-12-12 01:50:05 +01:00
chore: split render function into eval and render functions
allows access to more data of a nixlet module
This commit is contained in:
parent
cd8ed7719e
commit
0b7f99f81e
1 changed files with 39 additions and 33 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue