Skip to content

Defining top-level mkSubmoduleOptions causes error: infinite recursion encountered #178

Answered by roberth
MrFoxPro asked this question in Q&A
Discussion options

You must be logged in to vote

Do you really need a submodule? I think you could do:

-  options.hosts = mkSubmoduleOptions {
-      type = types.attrsOf (
+  options.hosts = mkOption {
+      type = types.attrsOf (

I wonder why this line did not give a proper type error, apparently.

type = types.attrsOf (

mkSubmoduleOptions expects a tree of options, as it creates a module from its argument.i

What error did you get?

here is full code

That's a whole file, not a reproducible example.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@MrFoxPro
Comment options

@roberth
Comment options

Answer selected by MrFoxPro
@MrFoxPro
Comment options

@roberth
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants