docs: add basic documentation to the infra-rebuild root command
All checks were successful
/ ruff (push) Successful in 25s
/ black (push) Successful in 25s

This way, by only looking at the help page, users should get a good
enough idea on how to use infra-rebuild to start using it.
This commit is contained in:
June 2024-06-10 02:35:59 +02:00
parent a7772aa154
commit 744bbdb245
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0

View file

@ -34,7 +34,17 @@ def update_recursive_option(ctx, option_name, given_value):
ctx.obj[option_name] = given_value
@click.group(context_settings={"help_option_names": ["-h", "--help"]}, invoke_without_command=True)
@click.group(
context_settings={"help_option_names": ["-h", "--help"]},
invoke_without_command=True,
help="""Runs COMMAND for each given host.
The commands mirror the operations of nixos-rebuild (with the exception of reboot, which is simply a convenience alias for "boot --reboot").
For commands acting remotely (boot, reboot, switch, test) infra-rebuild tries to be useful without any configuration by taking the FQDN from the hosts NixOS configuration as the target host.
However infra-rebuild also accepts configuration to override various aspects of the target host for specific or all hosts.
See the documentation on configuration for more information.""", # noqa: E501
)
@click.version_option(prog_name="infra-rebuild")
@click.pass_context
@click.option("--flake", help=flake_option_help_text)