From 4dd51a9acec772931976d325c7021b7156c13335 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 11 Jul 2023 12:20:25 +0200 Subject: [PATCH] lib/modules.nix: Inline single-use `subtree` bindings --- lib/modules.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/modules.nix b/lib/modules.nix index 5ae8bd1a4f72..0320a5d02c10 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -578,22 +578,22 @@ let # an attrset 'name' => list of submodules that define ‘name’. pushedDownDefinitionsByName = zipAttrsWith (n: concatLists) - (map (module: let subtree = module.config; in + (map (module: mapAttrs (n: value: map (config: { inherit (module) file; inherit config; }) (pushDownProperties value) ) - subtree + module.config ) checkedConfigs); # extract the definitions for each loc rawDefinitionsByName = zipAttrsWith (n: concatLists) - (map (module: let subtree = module.config; in + (map (module: mapAttrs (n: value: [{ inherit (module) file; inherit value; }] ) - subtree + module.config ) checkedConfigs); # Convert an option tree decl to a submodule option decl