lib.types.submodule: Remove redundant isSubmodule attr

main
Robert Hensing 2 years ago
parent d030e2109f
commit 58a8a48e9d
  1. 2
      lib/modules.nix
  2. 5
      lib/types.nix

@ -505,7 +505,7 @@ rec {
firstOption = findFirst (m: isOption m.options) "" decls;
firstNonOption = findFirst (m: !isOption m.options) "" decls;
in
if firstOption.options.type?isSubmodule && firstOption.options.type.isSubmodule
if firstOption.options.type.name == "submodule"
then
let opt = fixupOptionType loc (mergeOptionDecls loc (map optionTreeToOption decls));
in {

@ -642,11 +642,6 @@ rec {
else throw "A submoduleWith option is declared multiple times with conflicting shorthandOnlyDefinesConfig values";
};
};
} // {
# Submodule-typed options get special treatment in order to facilitate
# certain migrations, such as the addition of freeformTypes onto
# existing option trees.
isSubmodule = true;
};
# A value from a set of allowed ones.

Loading…
Cancel
Save