refactor(flake)!: flake.autoStuff -> auto.stuff

Avoids infinite recursion in `auto.configurations` and `auto.modules`
Can now fully dynamically define `configuration` and `module` types
This commit is contained in:
reo101 2024-09-01 04:29:32 +03:00
parent ea47ccd981
commit 7956cfd20a
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
6 changed files with 118 additions and 105 deletions

View file

@ -19,7 +19,7 @@ in
options = let
inherit (lib) types;
in {
flake.autoPackages = lib.mkOption {
auto.packages = lib.mkOption {
description = ''
Automagically generate packages from walking directories with Nix files
'';
@ -46,8 +46,8 @@ in
internal = true;
default =
lib.optionalAttrs
config.flake.autoPackages.enable
(createPackages config.flake.autoPackages.dir);
config.auto.packages.enable
(createPackages config.auto.packages.dir);
};
};
});
@ -59,7 +59,7 @@ in
perSystem = { lib, pkgs, system, ... }: let
packages =
lib.pipe
config.flake.autoPackages.result
config.auto.packages.result
[
(lib.filterAttrs
(name: { package, systems }: