forked from clan/clan-core
Compare commits
2 Commits
main
...
a-kenji-cl
Author | SHA1 | Date | |
---|---|---|---|
c7c400f51f | |||
ea6bd8f41d |
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user