From 7fd816ba89cb4d924d89b2f7e07028644dce0c7f Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Thu, 17 Mar 2022 17:53:52 -0600 Subject: home: add shenv gc root --- util/importAll.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'util') 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 -- cgit v1.2.3