Using ROCm with NixOS or Nixpkgs
2026 guide to using ROCm on NixOS by Luna NovaROCm config toggle§
Do:
- Access specific packages you want ROCm for via
pkgsRocm, such aspkgs.pkgsRocm.llama-cppandpkgsRocm.blender - Enable
config.rocmSupportfor a nixpkgs used in a purpose specific environment that uses ROCm.
Don't:
- Enable
config.rocmSupportglobally for an entire NixOS config or home-manager config
Why:
Many packages have some support for machine learning. Enabling it for all of them is at present increasing the chance you hit a build failure and possibly a reliability or security hazard.
ROCm's code quality isn't as good as browsers aim for. Firefox and thunderbird use ROCm via onnxruntime if enabled. They do sandbox in separate processes, but if you don't need it why risk it?
ROCm packages often are large, and there's no sense wasting gigabytes on them if you don't need them.