wolumonde: refactor module importing
This commit is contained in:
parent
a8616a0a93
commit
5c66afb75e
@ -56,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
allPkgs;
|
allPkgs;
|
||||||
in rec {
|
in {
|
||||||
nixosConfigurations = import ./hosts {inherit lib tlib inputs;};
|
nixosConfigurations = import ./hosts {inherit lib tlib inputs;};
|
||||||
|
|
||||||
packages = lib.mapAttrs (_: pkgs: pkgs._exported) allPkgs;
|
packages = lib.mapAttrs (_: pkgs: pkgs._exported) allPkgs;
|
||||||
|
@ -6,20 +6,11 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = let
|
imports = let
|
||||||
files =
|
b = builtins;
|
||||||
lib.filterAttrs
|
modules = toString ./modules;
|
||||||
(name: type: type == "regular" && name != "default.nix")
|
files = b.readDir modules;
|
||||||
(builtins.readDir (toString ./.));
|
|
||||||
filesToImport =
|
filesToImport =
|
||||||
builtins.map
|
b.map (name: "${modules}/${name}") (b.attrNames files);
|
||||||
(
|
|
||||||
name:
|
|
||||||
builtins.path {
|
|
||||||
inherit name;
|
|
||||||
path = "${toString ./.}/${name}";
|
|
||||||
}
|
|
||||||
)
|
|
||||||
(builtins.attrNames files);
|
|
||||||
in
|
in
|
||||||
filesToImport;
|
filesToImport;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user