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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
502 B
Nix
Raw Normal View History

2024-05-01 22:14:04 +00:00
{ 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;
};
}