default.nix: restructure Nix modules export

This commit is contained in:
Gabriel Arazas 2023-12-23 11:04:01 +08:00
parent a5ababe88d
commit efd7f3d3dd
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -1,13 +1,13 @@
{ pkgs ? import <nixpkgs> { } }:
let
lib' = pkgs.lib.extend (import ./lib/extras/extend-lib.nix);
lib = pkgs.lib.extend (import ./lib/extras/extend-lib.nix);
in
{
lib = import ./lib { lib = pkgs.lib; };
modules = lib'.importModules (lib'.filesToAttr ./modules/nixos);
modules.default.imports = import ./modules/nixos { inherit lib; };
overlays = import ./overlays // {
foo-dogsquared-pkgs = final: prev: import ./pkgs { pkgs = prev; };
};
hmModules = lib'.importModules (lib'.filesToAttr ./modules/home-manager);
hmModules.default.imports = import ./modules/home-manager { inherit lib; };
} // (import ./pkgs { inherit pkgs; })