Update docs/nixos-anywhere.md

Signed-off-by: hensoko <hensoko@gssws.de>
This commit is contained in:
hensoko 2025-02-17 16:56:16 +00:00 committed by hensoko
parent e016871a11
commit 062ee013b1
Signed by: pub.solar gitea
GPG key ID: F0332B04B7054873

View file

@ -1,7 +1,6 @@
```
curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz | tar -xzf- -C /root
/root/kexec/run
```
# Deploying with nixos-anywhere
## Basic steps
```
mkdir -p /etc/secrets/initrd
@ -9,5 +8,14 @@ ssh-keygen -t ed25519 -f /etc/secrets/initrd/ssh_host_ed25519_key
```
```
nix run github:nix-community/nixos-anywhere -- --flake .#blue-shell root@194.13.83.205
nix run github:nix-community/nixos-anywhere -- --flake .#<host> root@<ip>
```
## Enter NixOS from non-NixOS host
In case you cannot boot easily into a nixos-installer image you can download the kexec installer image of NixOS and kexec into it:
```
curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz | tar -xzf- -C /root
/root/kexec/run
```