diff options
author | sternenseemann <sternenseemann@systemli.org> | 2023-07-25 01:53:30 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2023-07-26 23:58:04 +0200 |
commit | 9c35f44999b38f07b674ff25cde17452ab4a1969 (patch) | |
tree | fbe8576b5fd723e2993e755e6cc820b0875c7f62 /lib/modules.nix | |
parent | 8ef139fe5251dd94b2464e8a21388deadd75aef6 (diff) | |
download | nixlib-9c35f44999b38f07b674ff25cde17452ab4a1969.tar nixlib-9c35f44999b38f07b674ff25cde17452ab4a1969.tar.gz nixlib-9c35f44999b38f07b674ff25cde17452ab4a1969.tar.bz2 nixlib-9c35f44999b38f07b674ff25cde17452ab4a1969.tar.lz nixlib-9c35f44999b38f07b674ff25cde17452ab4a1969.tar.xz nixlib-9c35f44999b38f07b674ff25cde17452ab4a1969.tar.zst nixlib-9c35f44999b38f07b674ff25cde17452ab4a1969.zip |
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.
Diffstat (limited to 'lib/modules.nix')
-rw-r--r-- | lib/modules.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/modules.nix b/lib/modules.nix index 0bedd28e877e..8a145b8f11f3 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 |