pkgs/cli: Query target-host for machines install from configuration

Query `target-host` for `clan machines install` from the nixos
configuration (deployment.json), if possible.

Remove `TARGET_HOST` option and introduce `--target-host` command
line flag.

This brings the installation subcommand in line with the update
subcommand - improving consistency and usability.

Closes: #2309
This commit is contained in:
a-kenji
2024-11-10 16:03:53 +01:00
parent 9723e9c210
commit d689dd8f6c
4 changed files with 22 additions and 16 deletions

View File

@@ -105,7 +105,7 @@
client.succeed("test -f test-flake/machines/test-install-machine/hardware-configuration.nix")
client.succeed("clan machines update-hardware-config --backend nixos-facter --flake test-flake test-install-machine root@target>&2")
client.succeed("test -f test-flake/machines/test-install-machine/facter.json")
client.succeed("clan machines install --debug --flake ${../..} --yes test-install-machine root@target >&2")
client.succeed("clan machines install --debug --flake ${../..} --yes test-install-machine --target-host root@target >&2")
try:
target.shutdown()
except BrokenPipeError: