This directory demonstrates how to make a system config and a bootable SD card image for Orange Pi 5 Plus
using kernel and uboot from upstream nixpkgs.
The flake.nix defines the single system config orangepi5plus suitable for Pi 5 Plus,
and the package sdImage that produces a bootable SD card image running orangepi5plus system.
You can use this as a starting configuration you customize to your needs,
or adapt to a slightly different board (like Orange Pi 5) that is supported by Nixpkgs kernel and u-boot.
To boot your Pi 5 Plus with this config, do the following.
- Modify the config as needed, run
nix build .#sdImagein this directory. - Decompress and flash
./result/sd-image/*into your SD card withdd. - Boot.
To rebuild on board:
- Copy this directory to your board, modify as needed.
- Run
sudo nixos-rebuild switch --flake .#orangepi5plus.
./configuration.nixis for your personal preferences for services and users. Do not forget to edit the current example contents../hardware-configuration.nixcurrently sets kernel version, drivers, parameters. Customize if needed../sdcard.nixsets up SD card image parameters (partitions, board-specific u-boot firmware). Change this if you want different partitioning, e.g. with swap.
Change uboot = pkgs.ubootOrangePi5Plus; to uboot = pkgs.ubootOrangePi5; in ./sdcard.nix.
This should be sufficient to make a config for Orange Pi 5.