summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2025-04-01 08:39:50 +0300
committerK900 <me@0upti.me>2025-04-01 08:39:50 +0300
commita6d566640096fc2db579d6c07ab0b8559eb5a4c3 (patch)
tree08adbd326f4d8080f2c3a9ddd9e33ebf82d014d6 /lib
parentMerge staging-next into staging (diff)
parentMerge master into staging-next (diff)
downloadnixpkgs-a6d566640096fc2db579d6c07ab0b8559eb5a4c3.tar.gz
Merge remote-tracking branch 'origin/staging-next' into staging
Diffstat (limited to 'lib')
-rw-r--r--lib/modules.nix12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index 935ef4baabad..8e6c6249f61c 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -320,7 +320,6 @@ let
prefix ? [],
}:
evalModules (evalModulesArgs // {
- inherit class;
modules = regularModules ++ modules;
specialArgs = evalModulesArgs.specialArgs or {} // specialArgs;
prefix = extendArgs.prefix or evalModulesArgs.prefix or [];
@@ -335,8 +334,7 @@ let
options = checked options;
config = checked (removeAttrs config [ "_module" ]);
_module = checked (config._module);
- inherit extendModules type;
- class = class;
+ inherit extendModules type class;
};
in result;
@@ -602,7 +600,7 @@ let
# an attrset 'name' => list of submodules that declare ‘name’.
declsByName =
zipAttrsWith
- (n: concatLists)
+ (n: v: v)
(map
(module: let subtree = module.options; in
if !(isAttrs subtree) then
@@ -614,7 +612,7 @@ let
else
mapAttrs
(n: option:
- [{ inherit (module) _file; pos = unsafeGetAttrPos n subtree; options = option; }]
+ { inherit (module) _file; pos = unsafeGetAttrPos n subtree; options = option; }
)
subtree
)
@@ -657,12 +655,12 @@ let
# extract the definitions for each loc
rawDefinitionsByName =
zipAttrsWith
- (n: concatLists)
+ (n: v: v)
(map
(module:
mapAttrs
(n: value:
- [{ inherit (module) file; inherit value; }]
+ { inherit (module) file; inherit value; }
)
module.config
)