From d7ac88762db111a7962c4e14b5f4e37ab85ccac7 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sun, 24 Aug 2025 18:55:06 -0600 Subject: tree-wide: reformat using alejandra after enabling trivionomicon --- pkgs/lib/default.nix | 5 ++--- pkgs/lib/importAll.nix | 31 +++++++++++++++++-------------- 2 files changed, 19 insertions(+), 17 deletions(-) (limited to 'pkgs/lib') diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index a273758..e3ab56e 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -1,4 +1,3 @@ -{ callPackage }: -{ - importAll = callPackage ./importAll.nix { }; +{callPackage}: { + importAll = callPackage ./importAll.nix {}; } diff --git a/pkgs/lib/importAll.nix b/pkgs/lib/importAll.nix index 30a1dd9..6acabe9 100644 --- a/pkgs/lib/importAll.nix +++ b/pkgs/lib/importAll.nix @@ -1,17 +1,20 @@ -{ lib }: -{ root, exclude ? [ ] }: -with builtins; with lib; - +{lib}: { + root, + exclude ? [], +}: +with builtins; +with lib; # http://chriswarbo.net/projects/nixos/useful_hacks.html -let - basename = removeSuffix ".nix"; + let + basename = removeSuffix ".nix"; - isMatch = name: type: (hasSuffix ".nix" name || type == "directory") - && ! elem name (map basename exclude); + isMatch = name: type: + (hasSuffix ".nix" name || type == "directory") + && ! elem name (map basename exclude); - entry = name: _: { - name = basename name; - value = import (root + "/${name}"); - }; -in -mapAttrs' entry (filterAttrs isMatch (readDir root)) + entry = name: _: { + name = basename name; + value = import (root + "/${name}"); + }; + in + mapAttrs' entry (filterAttrs isMatch (readDir root)) -- cgit v1.2.3