Chore: add _file for internals error tracing

This commit is contained in:
Johannes Kirschbauer
2025-06-25 15:47:15 +02:00
parent 1819243123
commit 16392622c5
7 changed files with 15 additions and 5 deletions

View File

@@ -121,6 +121,7 @@
roleName: roleSettingsModule:
mkOption {
type = types.submodule {
_file = "docs flake-module";
imports = [
{ _module.args = { inherit clanLib; }; }
(import ../../../lib/inventory/build-inventory/roles-interface.nix {
@@ -148,7 +149,10 @@
mkScope = name: modules: {
inherit name;
modules = [
{ _module.args = { inherit clanLib; }; }
{
_module.args = { inherit clanLib; };
_file = "docs mkScope";
}
{ noInstanceOptions = true; }
../../../lib/inventory/build-inventory/interface.nix
] ++ mapAttrsToList fakeInstanceOptions modules;

View File

@@ -170,6 +170,7 @@ in
getRoleFile = role: builtins.seq role inventory.modules.${serviceName} + "/roles/${role}.nix";
in
{
_file = "inventory/builder.nix";
_module.args = {
inherit
resolveTags

View File

@@ -421,6 +421,7 @@ in
types.submodule {
imports = [
{
_file = "inventory/interface";
_module.args = {
inherit clanLib;
};

View File

@@ -6,6 +6,7 @@ in
inherit (services) evalClanService mapInstances resolveModule;
inherit (import ./build-inventory { inherit lib clanLib; }) buildInventory;
interface = {
_file = "inventory/default.nix";
imports = [
./build-inventory/interface.nix
];

View File

@@ -15,9 +15,7 @@ let
modules = [
clanLib.inventory.interface
{
_module.args = {
inherit clanLib;
};
_file = "test file";
tags.all = [ ];
tags.nixos = [ ];
tags.darwin = [ ];

View File

@@ -56,7 +56,9 @@ let
{
constraints.imports = [
(lib.modules.importApply ../constraints {
resolvedRoles = { };
moduleName = "{moduleName}";
instanceName = "{instanceName}";
allRoles = [ "{roleName}" ];
})
];

View File

@@ -100,7 +100,10 @@ in
inventory = lib.mkOption {
type = types.submodule {
imports = [
{ _module.args = { inherit clanLib; }; }
{
_module.args = { inherit clanLib; };
_file = "clan interface";
}
../../inventory/build-inventory/interface.nix
];
};