Skip to content
Discussion options

You must be logged in to vote

Quick follow-up on the error itself -- it's now tracked internally, and here's what's actually going on.

The bare registry form fails because nothing hands your module a lib. nixpkgs' evalModules always passes lib (along with specialArgs and _prefix) to every module. gen-merge, the module engine den evaluates schemas with, doesn't pass it at any level; a module only gets lib if the caller puts it in specialArgs. den's mkInstanceType wrapper does that for you, which is why the type form works, while mkInstanceRegistry comes straight from gen-schema without the wrapper.

The message makes it worse. Because your module asked for an argument while it was declaring options, gen-merge's guard ag…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@sini
Comment options

sini Nov 13, 2026
Maintainer

@sini
Comment options

sini Nov 13, 2026
Maintainer

Answer selected by AlexLov
@AlexLov
Comment options

@AlexLov
Comment options

@sini
Comment options

sini Nov 14, 2026
Maintainer

@AlexLov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants