`m` must always be an attrset at this point. It is basically always evaluated. This will make it throw when any of the attrs is accessed, rather than just `config`. We assume that this will improve the error message in more scenarios.main
parent
dfd98a5da2
commit
3c4a49f506
@ -0,0 +1,20 @@ |
||||
{ config, lib, ... }: |
||||
let |
||||
inherit (lib) types mkOption setDefaultModuleLocation evalModules; |
||||
inherit (types) deferredModule lazyAttrsOf submodule str raw enum; |
||||
in |
||||
{ |
||||
options = { |
||||
deferred = mkOption { |
||||
type = deferredModule; |
||||
}; |
||||
result = mkOption { |
||||
default = (evalModules { modules = [ config.deferred ]; }).config.result; |
||||
}; |
||||
}; |
||||
config = { |
||||
deferred = { ... }: |
||||
# this should be an attrset, so this fails |
||||
true; |
||||
}; |
||||
} |
Loading…
Reference in new issue