@@ -323,7 +323,7 @@ def ssh_private_key() -> Iterator[SshKey]:
323
323
yield SshKey (private_key = private_key , public_key = public_key )
324
324
325
325
326
- def nixos_remote (ip : str , flake : str , ssh_private_key : Path , nixos_anywhere_args : List [str ]) -> None :
326
+ def nixos_anywhere (ip : str , flake : str , ssh_private_key : Path , nixos_anywhere_args : List [str ]) -> None :
327
327
run (
328
328
[
329
329
# FIXME: path
@@ -377,7 +377,7 @@ def pause():
377
377
print ("" )
378
378
input ("Press [enter] to terminate this script and tear down the network to the server." )
379
379
380
- def run_nixos_remote (options : Options ):
380
+ def run_nixos_anywhere (options : Options ):
381
381
pxe_image_store_path = build_pxe_image (options .netboot_image_flake )
382
382
383
383
random_hostname = f"nixos-pxe-{ binascii .b2a_hex (os .urandom (4 )).decode ('ascii' )} "
@@ -411,7 +411,7 @@ def run_nixos_remote(options: Options):
411
411
"Will now run nixos-remote on this target. You can also try to connect to the machine by doing:"
412
412
)
413
413
print (f" ssh -i { ssh_key .private_key } root@{ event .ip_addr } " )
414
- nixos_remote (event .ip_addr , options .flake , ssh_key .private_key , options .nixos_anywhere_args )
414
+ nixos_anywhere (event .ip_addr , options .flake , ssh_key .private_key , options .nixos_anywhere_args )
415
415
# to avoid having to reboot physical machines all the time because networking disappears:
416
416
if (options .pause_after_completion ):
417
417
print ("You can connect to the machine by doing:" )
@@ -430,7 +430,7 @@ def main(args: list[str] = sys.argv[1:]) -> None:
430
430
options = parse_args (args )
431
431
if os .geteuid () != 0 :
432
432
die ("You need to have root privileges to run this script. Exiting." )
433
- run_nixos_remote (options )
433
+ run_nixos_anywhere (options )
434
434
435
435
436
436
0 commit comments