1{ lib, ... }:
2let
3 myconf = lib.evalModules { modules = [ { } ]; };
4in
5{
6 options.foo = lib.mkOption {
7 type = lib.types.submodule { };
8 default = { };
9 };
10 config.foo =
11 { ... }:
12 {
13 imports = [
14 # error, like `import-configuration.nix`, but in a submodule this time
15 myconf
16 ];
17 };
18}