feat(nix): port over libs

This commit is contained in:
Mohammad Rafiq 2025-07-09 01:33:28 +08:00
parent 03bac12a2d
commit 96b5aa3fef
No known key found for this signature in database
3 changed files with 104 additions and 1 deletions

13
nix/lib/lists.nix Normal file
View file

@ -0,0 +1,13 @@
let
inherit (builtins) length tail;
in
{
flake.lib.lists = rec {
shortenList =
count: list:
let
len = length list;
in
if len <= count then list else (shortenList count (tail list));
};
}