Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(nixos): document liveusb generation #294

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions docs/src/hil/nixos-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,23 @@ On the ASUS NUCs, they don't support MBR partitioned live usbs. But for some
inexplicable reason the official NixOS installer *only* exists as a MBR partitioned
disk. This means we need to build our own GPT/UEFI based NixOS live usb ;(

TODO: Describe how to make a UEFI-compatible minimal nixos live usb. The TLDR
is that you use [nixos-generators][nixos-generators] with the `raw-efi` format.
To work around this limitation of the official installer, we provide a liveusb
image that has NixOS on it, and is built using the
[nixos-generators][nixos-generators] tool. To build the .img file yourself,
run:
```bash
nix build .#liveusb # if you are natively on x86-64 linux
```
If you are *not* on x86-64 linux, you should either ssh into a x86 linux
machine (such as one of the existing HILs) and SCP the image off, *or* you
should use the [remote builders][remote build] feature of nix. Here is an example:

```bash
# ensure that sshing as root works, and that your ssh keys don't require any passwords, etc
sudo ssh -T user@hostname
# actually do the build
nix build .#packages.x86_64-linux.liveusb --builders 'ssh://user@hostname x86_64-linux - - - kvm'
```

### Use the liveusb to install NixOS

Expand Down Expand Up @@ -128,3 +143,4 @@ config that we use. Luckily nix makes this really easy.

[nix config]: https://github.com/TheButlah/nix
[nixos-generators]: https://github.com/nix-community/nixos-generators
[remote build]: https://nix.dev/manual/nix/2.18/advanced-topics/distributed-builds
Loading