summary refs log tree commit diff
path: root/lib/modules.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2020-10-20 16:10:21 +0200
committerRobert Hensing <robert@roberthensing.nl>2020-10-22 13:46:48 +0200
commitf8ab5fcd8d15dd551dfc5c6e34f27a1e92d7b1f6 (patch)
tree9c028dfa0f29e0ad7e2e0b3a382b0553e4a9dbd3 /lib/modules.nix
parent9a4bed1a809b52626b3fa97095e4d96c67ab429e (diff)
downloadnixpkgs-f8ab5fcd8d15dd551dfc5c6e34f27a1e92d7b1f6.tar
nixpkgs-f8ab5fcd8d15dd551dfc5c6e34f27a1e92d7b1f6.tar.gz
nixpkgs-f8ab5fcd8d15dd551dfc5c6e34f27a1e92d7b1f6.tar.bz2
nixpkgs-f8ab5fcd8d15dd551dfc5c6e34f27a1e92d7b1f6.tar.lz
nixpkgs-f8ab5fcd8d15dd551dfc5c6e34f27a1e92d7b1f6.tar.xz
nixpkgs-f8ab5fcd8d15dd551dfc5c6e34f27a1e92d7b1f6.tar.zst
nixpkgs-f8ab5fcd8d15dd551dfc5c6e34f27a1e92d7b1f6.zip
lib/modules: Simplify inherits
Diffstat (limited to 'lib/modules.nix')
-rw-r--r--lib/modules.nix66
1 files changed, 32 insertions, 34 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index 37e2e23ec12..6c4a8f7b324 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -1,53 +1,51 @@
 { lib }:
 
 let
-  inherit (lib.attrsets)
-    mapAttrsRecursiveCond
-    ;
-  inherit (lib.lists)
-    any all concatLists concatMap
-    count filter findFirst foldl foldl'
-    head imap1 length optional
-    reverseList sort
-    ;
-  inherit (lib.options)
-    isOption
-    mkOption
-    showDefs
-    showFiles
-    showOption
-    unknownModule
-    ;
-  inherit (lib.attrsets)
+  inherit (lib)
+    all
+    any
     attrByPath
     attrNames
     catAttrs
+    concatLists
+    concatMap
+    count
+    elem
+    filter
+    findFirst
+    flip
+    foldl
+    foldl'
     getAttrFromPath
+    head
+    id
+    imap1
+    isAttrs
+    isBool
+    isFunction
+    isString
+    length
     mapAttrs
     mapAttrsToList
+    mapAttrsRecursiveCond
+    min
+    optional
     optionalAttrs
+    optionalString
     recursiveUpdate
+    reverseList sort
     setAttrByPath
     toList
-    ;
-  inherit (lib.types)
     types
-    ;
-  inherit (lib.trivial)
-    flip
-    id
-    isBool
-    isFunction
-    isString
-    min
     warn
     ;
-  inherit (lib.strings)
-    optionalString
-    ;
-  inherit (lib)
-    elem
-    isAttrs
+  inherit (lib.options)
+    isOption
+    mkOption
+    showDefs
+    showFiles
+    showOption
+    unknownModule
     ;
 in