anduril/jetpack-nixos
NixOS module for NVIDIA Jetson devices
jetpack‑nixos – NixOS support for NVIDIA Jetson ( JetPack )
What it is – A NixOS module and overlay that packages the NVIDIA JetPack SDK (firmware, kernel, CUDA, cuDNN, TensorRT, GStreamer plugins, Vulkan, etc.) for Jetson developer kits. It lets you install and run a full NixOS system on Jetson devices while keeping the JetPack‑provided drivers and libraries in sync.
Why it matters – Jetson boards are popular for edge AI, robotics and computer‑vision workloads. Normally you have to use NVIDIA’s Ubuntu‑based image and manually manage firmware, kernel and CUDA versions. jetpack‑nixos automates all of that inside the declarative NixOS ecosystem, giving reproducible builds, easy upgrades, and the ability to mix Nix‑provided packages with JetPack components.
Key capabilities
| Area | Provided by the repo |
|---|---|
| Firmware | Scripts to flash the EDK2‑based UEFI firmware, ARM Trusted Firmware, OP‑TEE. |
| Kernel | NVIDIA‑provided JetPack kernel (or a main‑line kernel via the bring‑your‑own‑kernel option). |
| GPU stack | CUDA, cuDNN, TensorRT, NVIDIA container toolkit. |
| Multimedia | V4L2‑accelerated encode/decode, GStreamer plugins, Wayland/GBM/EGL/Vulkan support. |
| Power management | nvpmodel, nvfancontrol. |
| Installation | Flake‑based ISO builder (iso_minimal, iso_minimal_jp5) and flashing utilities (flash‑<device>-devkit). |
| Container support | Docker/Podman integration with CDI device description for nvidia.com/gpu. |
| Updates | UEFI capsule‑based OTA firmware updates, optional signed‑capsule authentication. |
Typical workflow
- Flash UEFI – Run
nix build …#flash‑xavier‑agx‑devkit(or the appropriate device) on an x86_64 host and execute the resulting script as root. - Create installer ISO –
nix build …#iso_minimal(oriso_minimal_jp5for JetPack 5) and write it to a USB stick withdd. - Boot the Jetson – Use the UEFI boot manager to start the ISO, then follow the standard NixOS installation guide.
- Enable the JetPack module – In
configuration.nixset:hardware.nvidia-jetpack.enable = true; hardware.nvidia-jetpack.som = "orin-agx"; # or xavier‑agx, etc. hardware.nvidia-jetpack.carrierBoard = "devkit"; hardware.graphics.enable = true; # GPU support - (Optional) Containers – Enable
hardware.nvidia-container-toolkit.enableand Docker/Podman, then run containers with--device=nvidia.com/gpu=all. - Upgrade firmware – After a
nixos-rebuild switch, sethardware.nvidia-jetpack.bootloader.autoUpdate = trueor manually build a capsule (nix build .#uefi-capsule-update‑xavier‑nx‑emmc‑devkit) and apply it on the device.
Who should use it
- Robotics / edge‑AI engineers who need a reproducible OS image on Jetson boards.
- Researchers wanting to run CUDA‑accelerated ML frameworks (PyTorch, TensorFlow, OpenCV) inside Nix shells or containers.
- DevOps / CI folks who prefer declarative system definitions and want to version‑control the entire Jetson stack.
Limitations & gotchas
- Only Jetson devices supported by JetPack 5‑7 are covered (Orin AGX/NX/Nano, Xavier AGX/NX). Nano/TX1/TX2 are explicitly unsupported.
- Firmware and some flashing tools (
tegrarcm_v2) run only on an x86_64 host. - The Xavier AGX stores UEFI variables on an eMMC partition, so runtime EFI variable changes from Linux are not possible; boot order must be set manually.
- Graphical console output can be flaky on some Orin models; serial console is recommended for troubleshooting.
- CUDA binaries are non‑free; you must enable
allowUnfree = trueand setcudaSupport = truein the Nixpkgs config. - When mixing JetPack versions, the firmware, kernel and rootfs must all belong to the same major version; you cannot mix JetPack 5 firmware with a JetPack 6 kernel.
Quick start snippet (Flake‑based)
# flake.nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
jetpack.url = "github:anduril/jetpack-nixos";
jetpack.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, jetpack, ... }:
let
system = "aarch64-linux";
in {
nixosConfigurations.jetson = nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./configuration.nix jetpack.nixosModules.default ];
};
};
}
# configuration.nix (excerpt)
{
hardware.nvidia-jetpack.enable = true;
hardware.nvidia-jetpack.som = "orin-agx";
hardware.nvidia-jetpack.carrierBoard = "devkit";
hardware.graphics.enable = true;
hardware.nvidia-container-toolkit.enable = true;
virtualisation.docker.enable = true;
}
Where to learn more
- Repository README (the source of this summary) – contains detailed flashing, ISO‑building, and kernel‑overlay instructions.
- NVIDIA JetPack SDK documentation – for hardware‑specific features like TensorRT and Power models.
- NixOS manual – for general NixOS installation and flake usage.
- OpenEmbedded for Tegra (OE4T) – the upstream source of the cleaned‑up vendor kernel used by this project.
Bottom line: jetpack‑nixos bridges the gap between NVIDIA’s JetPack AI stack and the reproducible, declarative world of NixOS, making it practical to run AI workloads, containers, and custom kernels on Jetson edge devices.
Related
- Project
- Dispatch
- Project
- Project
- Project