This commit is contained in:
Chris Dombroski 2024-11-17 18:26:23 -05:00
parent e760320eaf
commit 451c79270d
2 changed files with 12 additions and 12 deletions

View file

@ -1,12 +1,11 @@
{ lib, ... }:
{
imports = builtins.map (n: ./${n}) (
builtins.attrNames (
lib.filterAttrs (k: v: v == "regular" && lib.hasSuffix ".nix" k && k != "default.nix") (
builtins.readDir ./.
)
)
);
imports = lib.pipe ./. [
builtins.readDir
(lib.filterAttrs (k: v: v == "regular" && lib.hasSuffix ".nix" k && k != "default.nix"))
builtins.attrNames
(builtins.map (n: ./${n}))
];
programs.home-manager.enable = true;
}

View file

@ -1,8 +1,9 @@
{ lib, ... }:
{
imports = builtins.map (n: ./common/${n}) (
builtins.attrNames (
lib.filterAttrs (k: v: v == "regular" && lib.hasSuffix ".nix" k) (builtins.readDir ./common)
)
);
imports = lib.pipe ./common [
builtins.readDir
(lib.filterAttrs (k: v: v == "regular" && lib.hasSuffix ".nix" k))
builtins.attrNames
(builtins.map (n: ./common/${n}))
];
}