diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-03-17 17:53:52 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-03-17 17:54:42 -0600 |
| commit | 7fd816ba89cb4d924d89b2f7e07028644dce0c7f (patch) | |
| tree | 46766472a6ea8ff381c45d77547b2ba54a8fb775 /util/importAll.nix | |
| parent | 484b589512acde9442d93ac9b6f331d7cc2551e6 (diff) | |
home: add shenv gc root
Diffstat (limited to '')
| -rw-r--r-- | util/importAll.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/importAll.nix b/util/importAll.nix index c4a092e..678cf06 100644 --- a/util/importAll.nix +++ b/util/importAll.nix @@ -4,11 +4,13 @@ with builtins; with lib; # http://chriswarbo.net/projects/nixos/useful_hacks.html let + basename = removeSuffix ".nix"; + isMatch = name: type: (hasSuffix ".nix" name || type == "directory") - && ! elem name exclude; + && ! elem name (map basename exclude); entry = name: _: { - name = removeSuffix ".nix" name; + name = basename name; value = import (root + "/${name}"); }; in |
