inventory/interface: reduce apply arguments chain by adding it to _module.args

This commit is contained in:
Johannes Kirschbauer
2025-06-25 13:39:41 +02:00
parent 4204381edc
commit 1819243123
7 changed files with 35 additions and 22 deletions

View File

@@ -122,8 +122,8 @@
mkOption {
type = types.submodule {
imports = [
{ _module.args = { inherit clanLib; }; }
(import ../../../lib/inventory/build-inventory/roles-interface.nix {
inherit clanLib;
nestedSettingsOption = mkOption {
type = types.raw;
description = ''
@@ -148,10 +148,9 @@
mkScope = name: modules: {
inherit name;
modules = [
(import ../../../lib/inventory/build-inventory/interface.nix {
inherit clanLib;
noInstanceOptions = true;
})
{ _module.args = { inherit clanLib; }; }
{ noInstanceOptions = true; }
../../../lib/inventory/build-inventory/interface.nix
] ++ mapAttrsToList fakeInstanceOptions modules;
urlPrefix = "https://github.com/nix-community/dream2nix/blob/main/";
};