machines update: use 'localhost' for local build

This commit is contained in:
DavHau
2025-08-06 19:06:20 +07:00
parent dbef6ced77
commit 8bafbcb295
2 changed files with 3 additions and 3 deletions

View File

@@ -237,7 +237,7 @@
"--flake", "/flake", "--flake", "/flake",
"--host-key-check", "none", "--host-key-check", "none",
"--upload-inputs", # Use local store instead of fetching from network "--upload-inputs", # Use local store instead of fetching from network
"--build-host", "local", "--build-host", "localhost",
"test-update-machine", "test-update-machine",
"--target-host", f"root@localhost", "--target-host", f"root@localhost",
], check=True) ], check=True)

View File

@@ -133,7 +133,7 @@ def update_command(args: argparse.Namespace) -> None:
# figure out on which machine to build on # figure out on which machine to build on
build_host: Host | None = None build_host: Host | None = None
if args.build_host: if args.build_host:
if args.build_host == "local": if args.build_host == "localhost":
build_host = LocalHost() build_host = LocalHost()
else: else:
build_host = Remote.from_ssh_uri( build_host = Remote.from_ssh_uri(
@@ -207,7 +207,7 @@ def register_update_parser(parser: argparse.ArgumentParser) -> None:
type=str, type=str,
help=( help=(
"The machine on which to build the machine configuration.\n" "The machine on which to build the machine configuration.\n"
"Pass 'local' to build on the local machine, or an ssh address like user@host:1234\n" "Pass 'localhost' to build on the local machine, or an ssh address like user@host:1234\n"
), ),
) )
parser.add_argument( parser.add_argument(