From 26344a7938211c0f34998e7335461f2d8cfeb127 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Tue, 26 Nov 2024 12:58:12 +0100 Subject: [PATCH] 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. --- pkgs/clan-cli/clan_cli/machines/install.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/clan-cli/clan_cli/machines/install.py b/pkgs/clan-cli/clan_cli/machines/install.py index 37f588e4e..ba4bd7330 100644 --- a/pkgs/clan-cli/clan_cli/machines/install.py +++ b/pkgs/clan-cli/clan_cli/machines/install.py @@ -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",