@@ -323,7 +323,7 @@ def ssh_private_key() -> Iterator[SshKey]:
323323 yield SshKey (private_key = private_key , public_key = public_key )
324324
325325
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 :
327327 run (
328328 [
329329 # FIXME: path
@@ -377,7 +377,7 @@ def pause():
377377 print ("" )
378378 input ("Press [enter] to terminate this script and tear down the network to the server." )
379379
380- def run_nixos_remote (options : Options ):
380+ def run_nixos_anywhere (options : Options ):
381381 pxe_image_store_path = build_pxe_image (options .netboot_image_flake )
382382
383383 random_hostname = f"nixos-pxe-{ binascii .b2a_hex (os .urandom (4 )).decode ('ascii' )} "
@@ -411,7 +411,7 @@ def run_nixos_remote(options: Options):
411411 "Will now run nixos-remote on this target. You can also try to connect to the machine by doing:"
412412 )
413413 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 )
415415 # to avoid having to reboot physical machines all the time because networking disappears:
416416 if (options .pause_after_completion ):
417417 print ("You can connect to the machine by doing:" )
@@ -430,7 +430,7 @@ def main(args: list[str] = sys.argv[1:]) -> None:
430430 options = parse_args (args )
431431 if os .geteuid () != 0 :
432432 die ("You need to have root privileges to run this script. Exiting." )
433- run_nixos_remote (options )
433+ run_nixos_anywhere (options )
434434
435435
436436
0 commit comments