diff --git a/overlays/libs/helpers.nix b/overlays/libs/helpers.nix index 63c3390f6..5b21d6477 100644 --- a/overlays/libs/helpers.nix +++ b/overlays/libs/helpers.nix @@ -1,6 +1,6 @@ { lib, ... }: with lib; -{ +rec { # TODO: Improve error-handling/provide error messages that specify the expected inputs for each function, etc @@ -12,4 +12,10 @@ with lib; # are we running on a NixOS system? isNixOS = builtins.readDir /etc ? NIXOS; + + # find the packages in the given that contain + filterListByPackageName = list: query: lib.lists.filter (x: lib.strings.hasInfix query (lib.strings.getName x)) list; + + # find the packages in systemPackages that contain + #filterSystemPackagesByPackageName = query: filterListByPackageName query environment.systemPackages; }