core/lib/tests/modules/deferred-module-error.nix
2024-06-30 09:12:46 +01:00

30 lines
502 B
Nix

{ 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;
};
}