NixOS module collection — NVIDIA JetPack SDK packaging for Jetson devices (fork of anduril/jetpack-nixos)

Qjp
OVERVIEW
Qjp ("Qompass AI JetPack", repo description: "NixOS module for NVIDIA Jetson devices") packages components from NVIDIA's JetPack SDK for NixOS — platform firmware flashing scripts, NVIDIA's 5.10 kernel with nvgpu, EDK2-based UEFI firmware, ARM Trusted Firmware/OP-TEE, and packages for CUDA/CuDNN/TensorRT, V4L2/gstreamer multimedia, Wayland/GBM/EGL/Vulkan graphics, and nvpmodel/nvfancontrol power and fan control. It targets JetPack 5.1 devices: Jetson Orin AGX, Orin NX, Xavier AGX, and Xavier NX (Nano/TX2/TX1 are not supported).
HOW IT WORKS
- 1Put the Jetson in recovery mode (hold recovery, press reset), connect USB, and confirm with `lsusb | grep -i NVIDIA` showing an `NVIDIA Corp. APX` device.
- 2On an x86_64 host, build and run the flash script for your device, e.g. `nix build .#flash-xavier-agx-devkit` then `sudo ./result/bin/flash-xavier-agx-devkit` (use `nix flake show` to see options).
- 3Build the installer ISO with `nix build .#iso_minimal` and write it to USB with `dd`.
- 4Boot the Jetson from USB via the UEFI Boot Manager and follow the NixOS manual's UEFI installation.
- 5Include the module in your configuration with `hardware.nvidia-jetpack.enable = true;`, `hardware.nvidia-jetpack.som = "xavier-agx";`, and `hardware.nvidia-jetpack.carrierBoard = "devkit";` before installing.
- 6Later, update firmware from the device: check with `ota-check-firmware`, build a capsule (`nix build .#uefi-capsule-update-<device>`), copy it over, and apply with `sudo ota-apply-capsule-update example.Cap`.
CONCEPTS
CONFIGURATION
| Option | Default | What it does |
|---|---|---|
enable | false (mkEnableOption) | Enable NVIDIA Jetson device support |
som | generic | SoM to target; enum: `generic`, `orin-agx`, `orin-agx-industrial`, `orin-nx`, `orin-nano`, `xavier-agx`, `xavier-agx-industrial`, `xavier-nx`, `xavier-nx-emmc` |
carrierBoard | generic | Carrier board to target; enum: `generic`, `devkit` |
configureCuda | true | Instantiate nixpkgs with `cudaSupport = true` and `cudaCapabilities` from the SoM (7.2 for Xavier, 8.7 for Orin) |
modesetting.enable | false | Enable kernel modesetting (set true for Wayland, false for X11 per README) |
maxClock | false | Always run at maximum clock speed (enables the `jetson_clocks` oneshot service) |
super | false | Enable "super mode" for Jetson Orin NX and Nano |
kernel.realtime | false | Enable PREEMPT_RT patches (uses the RT kernel packages) |
console.enable | config.console.enable | Enable the default console kernel parameters (tty0 + Tegra Combined UART) |
firmware.autoUpdate | false (mkEnableOption; README refers to it by its former name `bootloader.autoUpdate`) | Automatic firmware updates after `nixos-rebuild switch` via UEFI capsule update |
firmware.bootOrder | null | Default UEFI boot order (list over scsi/usb/sata/pxev4/httpv4/pxev6/httpv6/nvme/ufs/sd/emmc/cdrom/boot.img/virtual/shell) |
firmware.uefi.debugMode | false | EDK2/UEFI debug mode |
firmware.optee.supplicant.enable | true | tee-supplicant daemon for OP-TEE, with `extraArgs`, `trustedApplications`, `plugins` (all default `[ ]`) |
services.nvpmodel.enable / profileNumber | enabled by default when a config exists for the SoM / null | NVPModel power service; profileNumber selects a POWER_MODEL ID from the config file (null = the file's PM_CONFIG DEFAULT) |
services.nvfancontrol.enable | enabled by default on devkit carrier boards | Fan control service, with per-SoM config file selected in devices.nix |
CONTROLS
| Action | Control |
|---|---|
| Verify recovery mode | `lsusb \ |
| List build options | nix flake show |
| Build a flash script | `nix build github:anduril/jetpack-nixos#flash-xavier-agx-devkit` (README form; this fork's flake generates the same `flash-<devkit>` attributes) |
| Flash UEFI firmware | sudo ./result/bin/flash-xavier-agx-devkit |
| Build the installer ISO | `nix build github:anduril/jetpack-nixos#iso_minimal` (README form) |
| Write the ISO to USB | sudo dd if=./result/iso/nixos-22.11pre-git-aarch64-linux.iso of=/dev/sdX bs=1M oflag=sync status=progress |
| Check firmware vs software version | ota-check-firmware |
| Build a capsule update | nix build .#uefi-capsule-update-xavier-nx-emmc-devkit |
| Apply a capsule update | sudo ota-apply-capsule-update example.Cap` then `sudo reboot |
| Inspect capsule/slot status | sudo nvbootctrl dump-slots-info |
NOT COVERED
- The README is inherited from upstream `anduril/jetpack-nixos`: its commands reference `github:anduril/jetpack-nixos` and a `fetchTarball` of the anduril repo, not `qompassai/qjp`. The fork's own `flake.nix` does expose the same attribute names (`flash-*`, `iso_minimal`, `uefi-capsule-update-*` for orin-agx/orin-nx/orin-nano/xavier devkits), but no qjp-specific usage doc was found. - The README names the auto-update option `hardware.nvidia-jetpack.bootloader.autoUpdate`; in the current code that name is a renamed alias for `hardware.nvidia-jetpack.firmware.autoUpdate` (`modules/flash-script.nix`). - Orin Nano support is described in the README as future ("when the Orin Nano is released, it should be possible"), but the current `som` enum and flake hardware configs already include `orin-nano` — README and code disagree on vintage. - `kernel/`, `pkgs/`, `device-pkgs/`, and `anduril/` contents were not inventoried for this pack.
REFERENCES
- NVIDIA JetPack SDK documentationNVIDIA's canonical documentation for the JetPack SDK whose components Qjp packages for NixOS.
- jetpack-nixos — upstream projectThe upstream project Qjp forks; its flake exposes the same flash-*, iso_minimal and uefi-capsule-update-* attributes Qjp ships.