diff --git a/home-modules/default.nix b/home-modules/default.nix index b52b326..9b8c486 100644 --- a/home-modules/default.nix +++ b/home-modules/default.nix @@ -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; } diff --git a/nixos-modules/common.nix b/nixos-modules/common.nix index daf4479..b5f2c24 100644 --- a/nixos-modules/common.nix +++ b/nixos-modules/common.nix @@ -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})) + ]; }