hetzner_benchmark: document installer

This commit is contained in:
Primrose 2025-11-08 12:10:27 +08:00
parent b1395b27ce
commit 327088adc2
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -53,6 +53,30 @@ The `(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")` allows this.
- profit - profit
## Hetzner, nixos-anywhere
References:
- <https://github.com/nix-community/nixos-anywhere/blob/main/docs/quickstart.md>
- <https://wiki.nixos.org/wiki/Install_NixOS_on_Hetzner_Cloud>
I haven't figured out how to use raid on this machine, as it failed half-way
through the installer when I used the raid configuration.
### Pitfalls
- nixos-anywhere will wipe the disk, even if you use the flag `--generate-hardware-config`.
- The command is quite long and isn't non-flake friendly.
Note that the diskoScript has to come before toplevel derivation.
Read more on the order <https://github.com/nix-community/nixos-anywhere/issues/597>.
```fish
nixos-anywhere \
--generate-hardware-config nixos-generate-config ./hardware-configuration.nix \
-i <ssh_identity> \
--store-paths $(nix-build --no-out-link \
-A nixosConfigurations.hetzner_benchmark.config.system.build.diskoScript \
-A nixosConfigurations.hetzner_benchmark.config.system.build.toplevel) \
<user>@<host>
```
# Pitfalls # Pitfalls
## `users.mutableUsers` ## `users.mutableUsers`
NEVER set this to true without declaratively setting the passwords. NEVER set this to true without declaratively setting the passwords.