services: improve error when module not found

This commit is contained in:
DavHau
2025-06-30 18:32:42 +07:00
parent 8a7b6d13b5
commit 6f2672addd

View File

@@ -39,7 +39,11 @@ let
or (throw "flake input ${moduleSpec.input} doesn't export any clan services via the `clan.modules` output attribute"); or (throw "flake input ${moduleSpec.input} doesn't export any clan services via the `clan.modules` output attribute");
resolvedModule = resolvedModule =
resolvedModuleSet.${moduleSpec.name} resolvedModuleSet.${moduleSpec.name} or (throw ''
or (throw "flake input '${inputName}' doesn't provide clan-module with name ${moduleSpec.name}"); flake input '${inputName}' doesn't provide clan-module with name ${moduleSpec.name}.
Set `module.name = "self"` if the module is defined in your own flake.
Set `module.input = "<flake-input>" if the module is defined by a flake input called `<flake-input>`.
'');
in in
resolvedModule resolvedModule