From 9c35f44999b38f07b674ff25cde17452ab4a1969 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 25 Jul 2023 01:53:30 +0200 Subject: lib/modules: handle typeless options in mergeModules mkOption does not require a `type` argument and does not set the resulting attribute if it is not given. Consequently, we need to be prepared to merge options that have no type information. --- lib/modules.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/modules.nix') diff --git a/lib/modules.nix b/lib/modules.nix index 0bedd28e877e1..8a145b8f11f30 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -624,7 +624,7 @@ let unmatchedDefns = []; } else if optionDecls != [] then - if all (x: x.options.type.name == "submodule") optionDecls + if all (x: x.options.type.name or null == "submodule") optionDecls # Raw options can only be merged into submodules. Merging into # attrsets might be nice, but ambiguous. Suppose we have # attrset as a `attrsOf submodule`. User declares option -- cgit 1.4.1