git.iko.soy/typeable/nixpkgs
on master help sign in
lib/modules: Set submodule type for renamed option sets

For renames like mkAliasOptionModule [ "services" "compton" ] [ "services" "picom" ] where the target is an option set (like services.picom) instead of a single option (like services.picom.enable), previously the renamed option type was unset, leading to it being `types.unspecified`. This changes it to be `types.submodule {}` instead, which makes more sense.

commit7f2fcc45f734c1e73cef2d7063562b9e411c2614 authorSilvan Mosberger <contact@infinisil.com> dateThu 21 Jan 2021, 21:57 (6 years ago) parent33fc9b1
1 file changed+1−1
lib/modules.nix+1−1
lib/modules.nix+1−1
@@ -895,7 +895,7 @@ rec {
895895 fromOpt = getAttrFromPath from options;
896896 toOf = attrByPath to
897897 (abort "Renaming error: option `${showOption to}' does not exist.");
898− toType = let opt = attrByPath to {} options; in opt.type or null;
898+ toType = let opt = attrByPath to {} options; in opt.type or (types.submodule {});
899899 in
900900 {
901901 options = setAttrByPath from (mkOption {