mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
feat(modules): throw user friendly error if moduleDefinition does not exist
This commit is contained in:
parent
aeeaf2a9a0
commit
536f447530
1 changed files with 4 additions and 1 deletions
|
|
@ -132,7 +132,10 @@ in {
|
|||
configuration = mkOption {
|
||||
description = "Module configuration";
|
||||
type = submodule {
|
||||
imports = mkModuleOptions globalConfig.kubernetes.moduleDefinitions.${config.module} config;
|
||||
imports =
|
||||
if hasAttr config.module globalConfig.kubernetes.moduleDefinitions
|
||||
then mkModuleOptions globalConfig.kubernetes.moduleDefinitions.${config.module} config
|
||||
else throw ''Kubernetes moduleDefinition "${config.module}" does not exist'';
|
||||
};
|
||||
default = {};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue