Improve common import

This commit is contained in:
Chris Dombroski 2024-05-26 13:01:34 -04:00
parent 228759d340
commit ba2c3c21ca
2 changed files with 2 additions and 3 deletions

View file

@ -1,3 +1,3 @@
{...}: {
imports = builtins.map (n: toString ./common + "/${n}") (builtins.attrNames (builtins.removeAttrs (builtins.readDir ./common) [(builtins.unsafeGetAttrPos "_" {_ = null;}).file]));
{ lib, ...}: {
imports = builtins.map (n: ./common + "/${n}") (builtins.attrNames (lib.filterAttrs (k: v: v == "regular" && lib.hasSuffix ".nix" k) (builtins.readDir ./common)));
}

View file

@ -56,7 +56,6 @@
];
})
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello