Update docs/nixos-anywhere.md

This commit is contained in:
hensoko 2025-02-17 19:17:32 +00:00
parent d5644d2def
commit d0db1ecb21

View file

@ -9,16 +9,22 @@ curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-un
/root/kexec/run
```
## Run Disko
```
nix run github:nix-community/nixos-anywhere -- --flake .#<hostname> --target-host root@<host> --phases disko
```
## On Target: Create inital ssh host key used in initrd
```
mkdir -p /etc/secrets/initrd
ssh-keygen -t ed25519 -f /etc/secrets/initrd/ssh_host_ed25519_key
mkdir -p /mnt/etc/secrets/initrd
ssh-keygen -t ed25519 -f /mnt/etc/secrets/initrd/ssh_host_ed25519_key
```
## Run NixOS Anywhere
```
nix run github:nix-community/nixos-anywhere -- --flake .#<host> root@<ip>
nix run github:nix-community/nixos-anywhere -- --flake .#<hostname> --target-host root@<host> --phases install,reboot
```