docs: per-agent options page picks services.hyperhive.agent, and fails the eval if it goes empty
the page picked the top-level hyperhive attr, which stopped existing when the agent namespace moved under services.hyperhive.agent, so it rendered no options. the pick now uses the new root and asserts model, user.privateUsers and nixBuilds are present. the acp preset submodule options get the descriptions the now-rendered page requires. Closes #6136
This commit is contained in:
parent
0fbe137ace
commit
c490c72413
1 changed files with 33 additions and 3 deletions
|
|
@ -151,9 +151,34 @@ let
|
|||
]
|
||||
];
|
||||
|
||||
agentOptions = pickSubtrees agentEval.options [
|
||||
[ "hyperhive" ]
|
||||
# Options live under `services.hyperhive.agent`. The page must keep
|
||||
# listing known options from different agent modules; an empty page
|
||||
# fails the eval instead of publishing.
|
||||
agentRoot = [
|
||||
"services"
|
||||
"hyperhive"
|
||||
"agent"
|
||||
];
|
||||
agentRequired = [
|
||||
(agentRoot ++ [ "model" ])
|
||||
(
|
||||
agentRoot
|
||||
++ [
|
||||
"user"
|
||||
"privateUsers"
|
||||
]
|
||||
)
|
||||
(agentRoot ++ [ "nixBuilds" ])
|
||||
];
|
||||
agentPicked = pickSubtrees agentEval.options [ agentRoot ];
|
||||
agentOptions =
|
||||
assert lib.assertMsg (lib.all (p: lib.hasAttrByPath p agentPicked) agentRequired)
|
||||
"per-agent options page lost required options: ${
|
||||
lib.concatMapStringsSep ", " (lib.concatStringsSep ".") (
|
||||
lib.filter (p: !lib.hasAttrByPath p agentPicked) agentRequired
|
||||
)
|
||||
}";
|
||||
agentPicked;
|
||||
|
||||
hostDoc = pkgs.nixosOptionsDoc {
|
||||
options = hostOptions;
|
||||
|
|
|
|||
Loading…
Reference in a new issue