core/lib/tests/modules/deferred-module-error.nix

30 lines
502 B
Nix
Raw Normal View History

2024-05-01 22:14:04 +00:00
{ config, lib, ... }:
let
2024-06-30 08:16:52 +00:00
inherit (lib)
types
mkOption
setDefaultModuleLocation
evalModules
;
inherit (types)
deferredModule
lazyAttrsOf
submodule
str
raw
enum
;
2024-05-01 22:14:04 +00:00
in
{
options = {
2024-06-30 08:16:52 +00:00
deferred = mkOption { type = deferredModule; };
result = mkOption { default = (evalModules { modules = [ config.deferred ]; }).config.result; };
2024-05-01 22:14:04 +00:00
};
config = {
2024-06-30 08:16:52 +00:00
deferred =
{ ... }:
2024-05-01 22:14:04 +00:00
# this should be an attrset, so this fails
true;
};
}