1
0
forked from clan/clan-core

Compare commits

...

2 Commits

Author SHA1 Message Date
c7c400f51f wip 2024-04-24 10:42:34 +02:00
ea6bd8f41d checks 2024-04-24 10:42:34 +02:00

View File

@ -38,6 +38,8 @@ def install_nixos(
cmd = [
"nixos-anywhere",
"--debug",
"--copy-password",
"--flake",
f"{machine.flake}#{machine.name}",
"--no-reboot",
@ -54,7 +56,8 @@ def install_nixos(
run(
nix_shell(
["nixpkgs#nixos-anywhere"],
# ["nixpkgs#sshpass", "/home/kenji/git/nix-projects/nixos-anywhere"],
["nixpkgs#sshpass", "nixpkgs#nixos-anywhere"],
cmd,
),
log=Log.BOTH,
@ -117,6 +120,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)