@@ -399,19 +399,19 @@ <h3 id="9-run-it"><a class="header" href="#9-run-it">9. Run it</a></h3>
399
399
< p > < code > <ip address></ code > is the IP address of the target machine.</ p >
400
400
</ li >
401
401
</ ul >
402
- < pre > < code > nix run github:nix-community/nixos-anywhere -- --flake <path to configuration>#<configuration name> root@<ip address>
402
+ < pre > < code > nix run github:nix-community/nixos-anywhere -- --flake <path to configuration>#<configuration name> --target-host root@<ip address>
403
403
</ code > </ pre >
404
404
< p > The command would look like this if you had created your files in a directory
405
405
named < code > /home/mydir/test</ code > and the IP address of your target machine is
406
406
< code > 37.27.18.135</ code > :</ p >
407
- < pre > < code > nix run github:nix-community/nixos-anywhere -- --flake /home/mydir/test#hetzner-cloud
[email protected]
407
+ < pre > < code > nix run github:nix-community/nixos-anywhere -- --flake /home/mydir/test#hetzner-cloud
--target-host [email protected]
408
408
</ code > </ pre >
409
409
< p > If you also need to generate hardware configuration amend flags for
410
410
nixos-generate-config:</ p >
411
- < pre > < code > nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-generate-config ./hardware-configuration.nix --flake <path to configuration>#<configuration name> root@<ip address>
411
+ < pre > < code > nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-generate-config ./hardware-configuration.nix --flake <path to configuration>#<configuration name> --target-host root@<ip address>
412
412
</ code > </ pre >
413
413
< p > Or these flags if you are using nixos-facter instead:</ p >
414
- < pre > < code > nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-facter ./facter.json --flake <path to configuration>#<configuration name> root@<ip address>
414
+ < pre > < code > nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-facter ./facter.json --flake <path to configuration>#<configuration name> --target-host root@<ip address>
415
415
</ code > </ pre >
416
416
< p > Adjust the location of < code > ./hardware-configuration.nix</ code > and < code > ./facter.json</ code >
417
417
accordingly.</ p >
@@ -536,7 +536,7 @@ <h2 id="contents"><a class="header" href="#contents">Contents</a></h2>
536
536
< pre > < code > ssh -v nixos@fec0::5054:ff:fe12:3456
537
537
</ code > </ pre >
538
538
< p > You can then use the IP address to run < code > nixos-anywhere</ code > like this:</ p >
539
- < pre > < code > nix run github:nix-community/nixos-anywhere -- --flake '.#myconfig' nixos@fec0::5054:ff:fe12:3456
539
+ < pre > < code > nix run github:nix-community/nixos-anywhere -- --flake '.#myconfig' --target-host nixos@fec0::5054:ff:fe12:3456
540
540
</ code > </ pre >
541
541
< p > This example assumes a flake in the current directory containing a configuration
542
542
named < code > myconfig</ code > .</ p >
@@ -607,7 +607,7 @@ <h2 id="example-decrypting-an-openssh-host-key-with-pass"><a class="header" href
607
607
chmod 600 "$temp/etc/ssh/ssh_host_ed25519_key"
608
608
609
609
# Install NixOS to the host system with our secrets
610
- nixos-anywhere --extra-files "$temp" --flake '.#your-host' root@yourip
610
+ nixos-anywhere --extra-files "$temp" --flake '.#your-host' --target-host root@yourip
611
611
</ code > </ pre >
612
612
< h2 id ="example-uploading-disk-encryption-secrets "> < a class ="header " href ="#example-uploading-disk-encryption-secrets "> Example: Uploading Disk Encryption Secrets</ a > </ h2 >
613
613
< p > In a similar vein, < code > nixos-anywhere</ code > can upload disk encryption secrets, which
0 commit comments