Use lib.types system to merge attrsets without the module system?

for elegance I would liketo be able to write MMC_BLOCK_MINORS = "32"; and have it converted to a kernelItem submodule automatically.

So I run a mapAttrs on my config items and when I detect a freeform answer (ie, different than y/n/m), I generate { answer = "32"; optional = false; }

This doesn’t seem to be enough though:


while evaluating anonymous function at /home/teto/nixpkgs2/lib/types.nix:275:22, called from /home/teto/nixpkgs2/lib/attrsets.nix:200:54:
while evaluating the attribute 'value' at /home/teto/nixpkgs2/lib/modules.nix:353:27:
while evaluating anonymous function at /home/teto/nixpkgs2/lib/modules.nix:345:32, called from /home/teto/nixpkgs2/lib/modules.nix:345:19:
The option value `settings.MMC_BLOCK_MINORS' in `<unknown-file>' is not of type `submodule'.

how can I get my attrset converted to a kernelItem submodule ? I’ve seen the packSubmodule but haven’t been too successful with it.