mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
cleanup(lib): remove deprecated importModule method
This commit is contained in:
parent
da12e2a319
commit
aab68623e0
1 changed files with 0 additions and 23 deletions
23
lib.nix
23
lib.nix
|
|
@ -44,27 +44,4 @@ in rec {
|
||||||
i = acc.i + 1;
|
i = acc.i + 1;
|
||||||
value = acc.value + (toInt char) * (exp 8 acc.i);
|
value = acc.value + (toInt char) * (exp 8 acc.i);
|
||||||
}) {i = 0; value = 0;} (stringToCharacters value)).value;
|
}) {i = 0; value = 0;} (stringToCharacters value)).value;
|
||||||
|
|
||||||
importModule = {module ? null, modules ? [module], config}: let
|
|
||||||
specialArgs = {
|
|
||||||
kubenix = import ./. { inherit pkgs lib; };
|
|
||||||
parentConfig = config;
|
|
||||||
};
|
|
||||||
|
|
||||||
isModule = hasAttr "module" config;
|
|
||||||
|
|
||||||
moduleDefinition = (evalModules {
|
|
||||||
inherit modules specialArgs;
|
|
||||||
check = false;
|
|
||||||
}).config.module.definition;
|
|
||||||
in mkOption {
|
|
||||||
description = "Module ${moduleDefinition.name} version ${moduleDefinition.version}";
|
|
||||||
type = submoduleWithSpecialArgs ({name, ...}: let
|
|
||||||
name' = if isModule then "${config.module.name}-${name}" else name;
|
|
||||||
in {
|
|
||||||
imports = modules;
|
|
||||||
module.name = mkOptionDefault name';
|
|
||||||
}) specialArgs;
|
|
||||||
default = {};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue