Build custom ISO images for Nix using github actions
Easy to create, custom ISO images for NixOS starting with raspberry pi.
The idea is to create a simple ISO image with some presets, then use something like deploy-rs to update the raspis.
If you need to build a quick raspi custom image using nixos, this repo is for you. It also works well if you want to experiment with nixos.
An alternative, and more advanced approach, is to create a nixos image for your raspberry, with the most basic features, and then, use something like deploy-rs or bento to update and configure your raspberries.
- Fork this repo
- Go to the github actions section
- Click on "Build ISO"
- Trigger the workflow with the inputs you want to customize
- Wait
- Download the ISO
- Flash it
When you fork the repo, you can custommize the ganix.nix
file, and you won't need to provide
the env variables for the github action
nix flake check --impure
Supported arch aarch64-linux
nix build
Plug sd-card.
Find out USB's location.
Mac | Linux |
---|---|
diskutil list |
lsblk -l |
(output e.g: /dev/disk2
)
Check that the SD is unmounted
Mac | Linux |
---|---|
sudo diskutil unmountDisk /dev/disk2 |
sudo umount /dev/sda2 |
Burn the .img
to the sd-card
sudo dd if=result/nixos-sd-image-23.05.20230326.0cd51a9-aarch64-linux.img of=/dev/disk2 bs=1m status=progress
Remember to download the img and unzip it from the github action.
Good luck!
Take a look at nixos configuration.