summary refs log tree commit diff
path: root/lib/modules.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-07-11 12:38:49 +0200
committerRobert Hensing <robert@roberthensing.nl>2023-07-11 13:03:52 +0200
commit8f700580b984290adefa4b32ce1abafda04af6cf (patch)
tree8d0d2f16cc2c6dbad94cc02379982d71344b98ee /lib/modules.nix
parent4dd51a9acec772931976d325c7021b7156c13335 (diff)
downloadnixpkgs-8f700580b984290adefa4b32ce1abafda04af6cf.tar
nixpkgs-8f700580b984290adefa4b32ce1abafda04af6cf.tar.gz
nixpkgs-8f700580b984290adefa4b32ce1abafda04af6cf.tar.bz2
nixpkgs-8f700580b984290adefa4b32ce1abafda04af6cf.tar.lz
nixpkgs-8f700580b984290adefa4b32ce1abafda04af6cf.tar.xz
nixpkgs-8f700580b984290adefa4b32ce1abafda04af6cf.tar.zst
nixpkgs-8f700580b984290adefa4b32ce1abafda04af6cf.zip
lib/modules.nix: Format
Diffstat (limited to 'lib/modules.nix')
-rw-r--r--lib/modules.nix47
1 files changed, 28 insertions, 19 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index 0320a5d02c1..de0fcce6ef4 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -541,8 +541,10 @@ let
     let
       # an attrset 'name' => list of submodules that declare ‘name’.
       declsByName =
-        zipAttrsWith (n: concatLists)
-          (map (module: let subtree = module.options; in
+        zipAttrsWith
+          (n: concatLists)
+          (map
+            (module: let subtree = module.options; in
               if !(builtins.isAttrs subtree) then
                 throw ''
                   An option declaration for `${builtins.concatStringsSep "." prefix}' has type
@@ -555,7 +557,8 @@ let
                     [{ inherit (module) _file; options = option; }]
                   )
                   subtree
-              ) options);
+              )
+            options);
 
       # The root of any module definition must be an attrset.
       checkedConfigs =
@@ -577,24 +580,30 @@ let
 
       # an attrset 'name' => list of submodules that define ‘name’.
       pushedDownDefinitionsByName =
-        zipAttrsWith (n: concatLists)
-          (map (module:
-                mapAttrs
-                  (n: value:
-                    map (config: { inherit (module) file; inherit config; }) (pushDownProperties value)
-                  )
-                  module.config
-              ) checkedConfigs);
+        zipAttrsWith
+          (n: concatLists)
+          (map
+            (module:
+              mapAttrs
+                (n: value:
+                  map (config: { inherit (module) file; inherit config; }) (pushDownProperties value)
+                )
+              module.config
+            )
+            checkedConfigs);
       # extract the definitions for each loc
       rawDefinitionsByName =
-        zipAttrsWith (n: concatLists)
-          (map (module:
-                mapAttrs
-                  (n: value:
-                    [{ inherit (module) file; inherit value; }]
-                  )
-                  module.config
-              ) checkedConfigs);
+        zipAttrsWith
+          (n: concatLists)
+          (map
+            (module:
+              mapAttrs
+                (n: value:
+                  [{ inherit (module) file; inherit value; }]
+                )
+                module.config
+            )
+            checkedConfigs);
 
       # Convert an option tree decl to a submodule option decl
       optionTreeToOption = decl: