-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nixos-anywhere: add --target-host option
Mirror the option from nixos-rebuild, so both have the same signature: * Bootstrap: `nixos-anywhere --flake .#targethost --target-host [email protected]` * Deploy: `nixos-rebuild --flake .#targethost --target-host [email protected] switch`
- Loading branch information
1 parent
b7e91fa
commit 653f13c
Showing
6 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -217,28 +217,28 @@ You can now run **nixos-anywhere** from the command line as shown below, where: | |
- `<ip address>` is the IP address of the target machine. | ||
|
||
``` | ||
nix run github:nix-community/nixos-anywhere -- --flake <path to configuration>#<configuration name> root@<ip address> | ||
nix run github:nix-community/nixos-anywhere -- --flake <path to configuration>#<configuration name> --target-host root@<ip address> | ||
``` | ||
|
||
The command would look like this if you had created your files in a directory | ||
named `/home/mydir/test` and the IP address of your target machine is | ||
`37.27.18.135`: | ||
|
||
``` | ||
nix run github:nix-community/nixos-anywhere -- --flake /home/mydir/test#hetzner-cloud [email protected] | ||
nix run github:nix-community/nixos-anywhere -- --flake /home/mydir/test#hetzner-cloud --target-host [email protected] | ||
``` | ||
|
||
If you also need to generate hardware configuration amend flags for | ||
nixos-generate-config: | ||
|
||
``` | ||
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> | ||
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> | ||
``` | ||
|
||
Or these flags if you are using nixos-facter instead: | ||
|
||
``` | ||
nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-facter ./facter.json --flake <path to configuration>#<configuration name> root@<ip address> | ||
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> | ||
``` | ||
|
||
Adjust the location of `./hardware-configuration.nix` and `./facter.json` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters