diff --git a/pkgs/clan-cli/clan_cli/machines/install.py b/pkgs/clan-cli/clan_cli/machines/install.py index 14644705..07098adb 100644 --- a/pkgs/clan-cli/clan_cli/machines/install.py +++ b/pkgs/clan-cli/clan_cli/machines/install.py @@ -38,6 +38,8 @@ def install_nixos( cmd = [ "nixos-anywhere", + "--debug", + "--copy-password", "--flake", f"{machine.flake}#{machine.name}", "--no-reboot", @@ -54,7 +56,7 @@ def install_nixos( run( nix_shell( - ["nixpkgs#nixos-anywhere"], + ["nixpkgs#sshpass", "/home/kenji/git/nix-projects/nixos-anywhere"], cmd, ), log=Log.BOTH, @@ -117,6 +119,18 @@ def register_install_parser(parser: argparse.ArgumentParser) -> None: parser.add_argument( "target_host", type=str, + nargs="?", help="ssh address to install to in the form of user@host:2222", ) + group = parser.add_mutually_exclusive_group(required=False) + group.add_argument( + "-j", + "--json", + help="specify the json file for ssh data (generated by starting the clan installer)", + ) + group.add_argument( + "-P", + "--png", + help="specify the json file for ssh data as the qrcode image (generated by starting the clan installer)", + ) parser.set_defaults(func=install_command)