harness-base: add assertions for common agent config mistakes (closes #318)
This commit is contained in:
parent
ce539559d5
commit
e70ae7776c
1 changed files with 3 additions and 1 deletions
|
|
@ -329,8 +329,10 @@
|
||||||
# expected to set `_module.args.flakeInputs = builtins.removeAttrs inputs ["self"]`.
|
# expected to set `_module.args.flakeInputs = builtins.removeAttrs inputs ["self"]`.
|
||||||
# If `self` leaks into flakeInputs the agent gets a spurious attrset
|
# If `self` leaks into flakeInputs the agent gets a spurious attrset
|
||||||
# entry that can shadow real inputs and is almost certainly a bug.
|
# entry that can shadow real inputs and is almost certainly a bug.
|
||||||
|
# Guard with `or {}` so standalone evaluation stays clean when
|
||||||
|
# flakeInputs is absent from _module.args.
|
||||||
{
|
{
|
||||||
assertion = !(builtins.hasAttr "self" flakeInputs);
|
assertion = !(builtins.hasAttr "self" (config._module.args.flakeInputs or { }));
|
||||||
message = ''
|
message = ''
|
||||||
hyperhive: `flakeInputs` must not contain "self".
|
hyperhive: `flakeInputs` must not contain "self".
|
||||||
In your agent flake.nix, use:
|
In your agent flake.nix, use:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue