mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
feat: add support for legacy buildResources
This commit is contained in:
parent
e5135b329f
commit
3c54c20836
1 changed files with 22 additions and 1 deletions
23
default.nix
23
default.nix
|
|
@ -28,8 +28,29 @@ let
|
|||
|
||||
modules = import ./modules;
|
||||
|
||||
# legacy support for buildResources
|
||||
buildResources = {
|
||||
configuration ? {},
|
||||
writeJSON ? true,
|
||||
writeHash ? true
|
||||
}: let
|
||||
evaled = evalModules {
|
||||
modules = [
|
||||
configuration
|
||||
modules.legacy
|
||||
];
|
||||
};
|
||||
|
||||
generated = evaled.config.kubernetes.generated;
|
||||
|
||||
result =
|
||||
if writeJSON
|
||||
then pkgs.writeText "resources.json" (builtins.toJSON generated)
|
||||
else generated;
|
||||
in result;
|
||||
|
||||
kubenix = {
|
||||
inherit evalModules modules;
|
||||
inherit evalModules buildResources modules;
|
||||
|
||||
lib = kubenixLib;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue