vars: reduce dependency on pkgs

pass pkgs only to generators submodule which is the only place where it is needed because of finalScript
This commit is contained in:
DavHau
2025-07-15 12:14:46 +07:00
parent dc3a41f403
commit 61df393c2d

View File

@@ -27,6 +27,12 @@ let
;
# the original types.submodule has strange behavior
submodule =
module:
submoduleWith {
modules = [ module ];
};
submoduleWithPkgs =
module:
submoduleWith {
specialArgs.pkgs = pkgs;
@@ -44,7 +50,7 @@ in
'';
default = { };
type = attrsOf (
submodule (generator: {
submoduleWithPkgs (generator: {
imports = [ ./generator.nix ];
options = {
name = lib.mkOption {