diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-07-11 12:20:25 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-07-11 12:33:41 +0200 |
commit | 4dd51a9acec772931976d325c7021b7156c13335 (patch) | |
tree | fadbd0aabad7e2dc1301e7ae7866bcffe1b5f78e /lib/modules.nix | |
parent | 6acc3114c30564d112c2c83836c9eb0685165d9a (diff) | |
download | nixpkgs-4dd51a9acec772931976d325c7021b7156c13335.tar nixpkgs-4dd51a9acec772931976d325c7021b7156c13335.tar.gz nixpkgs-4dd51a9acec772931976d325c7021b7156c13335.tar.bz2 nixpkgs-4dd51a9acec772931976d325c7021b7156c13335.tar.lz nixpkgs-4dd51a9acec772931976d325c7021b7156c13335.tar.xz nixpkgs-4dd51a9acec772931976d325c7021b7156c13335.tar.zst nixpkgs-4dd51a9acec772931976d325c7021b7156c13335.zip |
lib/modules.nix: Inline single-use `subtree` bindings
Diffstat (limited to 'lib/modules.nix')
-rw-r--r-- | lib/modules.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/modules.nix b/lib/modules.nix index 5ae8bd1a4f7..0320a5d02c1 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 |