Add more custom libs

This commit is contained in:
SebastianStork 2025-10-13 14:12:18 +02:00
parent f084e91ec0
commit 3acd35c7b2
5 changed files with 22 additions and 27 deletions

View file

@ -1,11 +1,10 @@
{ self, lib, ... }:
{ self, inputs, ... }:
let
listNixFilesRecursive =
dir: dir |> lib.filesystem.listFilesRecursive |> lib.filter (lib.hasSuffix ".nix");
lib = inputs.nixpkgs.lib.extend (_: _: { custom = import "${self}/lib" inputs.nixpkgs.lib; });
in
{
flake = {
nixosModules.default.imports = listNixFilesRecursive "${self}/modules/system";
homeManagerModules.default.imports = listNixFilesRecursive "${self}/modules/home";
nixosModules.default.imports = lib.custom.listNixFilesRecursive "${self}/modules/system";
homeManagerModules.default.imports = lib.custom.listNixFilesRecursive "${self}/modules/home";
};
}