diff options
| author | Alejandro Soto <alejandro@34project.org> | 2025-08-24 18:55:06 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2025-08-24 18:55:06 -0600 |
| commit | d7ac88762db111a7962c4e14b5f4e37ab85ccac7 (patch) | |
| tree | 0c2c8c4383bef74215e3b7c48a2f6b0117f084bc /pkgs/lib/importAll.nix | |
| parent | 504589d1035f27b766bd33040b415b2725ece4ca (diff) | |
tree-wide: reformat using alejandra after enabling trivionomicon
Diffstat (limited to '')
| -rw-r--r-- | pkgs/lib/importAll.nix | 31 |
1 files changed, 17 insertions, 14 deletions
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)) |
