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.
This commit is contained in:
parent
33fc9b1c6d
commit
7f2fcc45f7
1 changed files with 1 additions and 1 deletions
|
@ -895,7 +895,7 @@ rec {
|
||||||
fromOpt = getAttrFromPath from options;
|
fromOpt = getAttrFromPath from options;
|
||||||
toOf = attrByPath to
|
toOf = attrByPath to
|
||||||
(abort "Renaming error: option `${showOption to}' does not exist.");
|
(abort "Renaming error: option `${showOption to}' does not exist.");
|
||||||
toType = let opt = attrByPath to {} options; in opt.type or null;
|
toType = let opt = attrByPath to {} options; in opt.type or (types.submodule {});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = setAttrByPath from (mkOption {
|
options = setAttrByPath from (mkOption {
|
||||||
|
|
Loading…
Reference in a new issue