pkgs/cli: Add --password flag to machines install

Add `--password` flag to `clan machines install`,
which allows installing through the `nixos-image` installer
manually without extra configuration.
This commit is contained in:
a-kenji
2024-11-26 12:58:12 +01:00
parent 6be9377ecb
commit 22af137e17

View File

@@ -148,6 +148,9 @@ def install_command(args: argparse.Namespace) -> None:
target_host = str(machine.target_host)
password = None
if args.password:
password = args.password
if not target_host:
msg = "No target host provided, please provide a target host."
raise ClanError(msg)
@@ -240,6 +243,10 @@ def register_install_parser(parser: argparse.ArgumentParser) -> None:
help="ssh address to install to in the form of user@host:2222",
)
add_dynamic_completer(target_host_parser, complete_target_host)
parser.add_argument(
"--password",
help="specify the password for the ssh connection (generated by starting the clan installer)",
)
group.add_argument(
"-P",
"--png",