about summary refs log tree commit diff
diff options
context:
space:
mode:
authorazahi <azat@bahawi.net>2025-02-17 02:30:01 +0300
committerazahi <azat@bahawi.net>2025-02-17 02:30:01 +0300
commit4678184b4e1337bc5bbbb4041fcd8556d5c2a542 (patch)
treeb675ef0c694cc36a5a399cc2120abd6010541fde
parent2025-02-17 (diff)
2025-02-17 HEAD master
-rw-r--r--lib/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/default.nix b/lib/default.nix
index fbb6086..c498c38 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -15,16 +15,16 @@
 
   isEven =
     number:
-    assert (builtins.isInt number) || (builtins.isFloat number);
+    assert builtins.isInt number || builtins.isFloat number;
     builtins.div number 2 == 0;
 
   isOdd = number: !lib.isEven number;
 
   pow =
     base: exponent:
-    assert (builtins.isInt base) && (builtins.isInt exponent);
+    assert builtins.isInt base && builtins.isInt exponent;
     assert exponent > 0;
-    builtins.foldl' (x: _: x * base) 1 (builtins.genList (_: _) exponent);
+    exponent |> builtins.genList (_: _) |> builtins.foldl' (x: _: x * base) 1;
 
   mkTcpMem =
     min: ini: max:
@@ -53,7 +53,7 @@
     dir:
     dir
     |> builtins.readDir
-    |> (lib.mapAttrsToList (
+    |> lib.mapAttrsToList (
       name: type:
       let
         modulePath = dir + "/${name}";
@@ -64,7 +64,7 @@
         [ (lib.nameValuePair name modulePath) ]
       else
         [ ]
-    ))
+    )
     |> lib.concatLists
     |> lib.listToAttrs;
 

Consider giving Nix/NixOS a try! <3