This flake builds a bootable nixosSystem for the Turing RK1. It uses u-boot and the stable kernel (6.17) from NixOS 25.05.
As of now, you have to be on an aarch64-linux system to build the flake. Adding support for cross-compilation on x86_64-linux is planned. You can use binfmt locally or remote for now:
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];Build the image from the GitHub repo:
nix build github:GiyoMoon/nixos-turing-rk1#nixosConfigurations.turing-rk1.config.system.build.sdImageBuild the image locally:
nix build .#nixosConfigurations.turing-rk1.config.system.build.sdImageThe created image can be found under ./result/sd-image/.
Default credentials:
- username:
nixos - password:
turing
You can use this flake as a hardware config in your flake:
inputs = {
turing-rk1 = {
url = "github:GiyoMoon/nixos-turing-rk1";
};
};And then include turing-rk1.nixosModules.turing-rk1 in your modules for your system.
While the RK1 supports booting off an external block device, uboot still needs to be on the eMMC to handle the boot process. You can download an image that only contains uboot from the releases page or build it yourself:
nix build github:GiyoMoon/nixos-turing-rk1#uboot-turing-rk1
# or locally:
nix build .#uboot-turing-rk1The image will be created under ./result/sd-image/uboot.img.
Flashing the OS image to the external block device is a bit tricky too, as we can't use the BMC of the Turing Pi. We have to either flash it by using a third-party device or we first flash NixOS onto the eMMC, flash the image to the external block device from within the RK1, then wipe the eMMC again with the small image that only contains uboot. I didn't want to open my case again to get the NVMe drives out, so I went with the latter, let's go through the steps:
- Flash the
nixos.imgimage (Download from releases or build yourself) onto the eMMC over the BMC User Interface - Power on the node
- Copy
nixos.imgto the node:
scp nixos.img nixos@{NODE_IP}:/home/nixos/- SSH into the node and flash the image on the external block device. I'm flashing it to the NVMe drive under
/dev/nvme0n1
sudo dd if=nixos.img of=/dev/nvme0n1 bs=4M status=progress oflag=sync
sudo sync- Power off the node
- Flash the
uboot.imgimage (Download from releases or build yourself) onto the eMMC over the BMC User Interface
Done! We now have a clean NixOS install on the external block device. The eMMC only contains uboot which will boot from the external device.
- Add the Mali G610 firmware required for the GPU
- Support cross-compilation on x86_64-linux
- ryan4yin/nixos-rk3588
- Joshua-Riek/ubuntu-rockchip
- @soxrok2212 created the fan curve patch
