Nix4Loong
Nix4Loong is a community-driven project initiated by loongson-community , focused on bringing the NixOS Linux distribution and its package collection Nixpkgs to the new-world LoongArch architecture through comprehensive upstream integration.
About NixOS and Nixpkgs
NixOS is a Linux distribution built on the Nix package manager with a declarative configuration model . Key features include :
- Reproducibility: Packages are built in isolated environments, ensuring reproducible builds with no undeclared dependencies
- Declarative configuration: Your entire system configuration is described in a single file, making it easy to share and replicate
- Atomic upgrades and rollbacks: System updates are atomic operations that can be easily rolled back to previous states
- Multi-version coexistence: Install multiple versions of the same package simultaneously, eliminating “DLL hell” conflicts
- Pure functional package management: All packages live in
/nix/storewith unique path identifiers for complete isolation
Nixpkgs is the Nix ecosystem’s package collection, containing over 120,000 packages – one of the world’s largest package repositories. Unlike traditional distribution package managers, Nix runs on all major Linux distributions and can install packages from Nixpkgs directly, giving users access to an enormous selection of software.
About New-World LoongArch
LoongArch is an independent instruction set architecture first publicly released by Loongson Technology in August 2020. This entirely new RISC-based architecture features:
- Complete independence: Completely self-designed instruction set architecture, abandoning the MIPS architecture used in earlier Loongson processors
- Modern architecture: 32-bit fixed-length RISC instruction set, 32 general-purpose registers, 32 floating-point/vector registers
- Cross-platform compatibility: Efficiently runs x86 and ARM programs through hardware-accelerated binary translation
- Wide deployment: Used across embedded devices, desktops, and servers
Currently, the flagship LoongArch processor is the 3C6000 series, with the 3C6000/S model offering 16 cores and 32 threads. According to Loongson Technology , its performance in the SPEC CPU 2017 benchmark is claimed to match that of the Intel Xeon Silver 4314 (also 16 cores and 32 threads), released in 2021.
An important aspect to understand about LoongArch is that it currently has two distinct and incompatible software ecosystems, known as “old-world” and “new-world” :
- Old-world: The original ecosystem developed internally by Loongson Technology and released with LoongArch, mainly used in commercial distributions like Kylin and UOS
- New-world: An open-source ecosystem developed collaboratively between Loongson Technology and the community, adopted by mainstream distributions including Arch Linux for Loong64 , Gentoo , and AOSC OS
New-world follows standard open-source development practices, with changes typically submitted upstream for better compatibility and maintainability. Old-world is gradually being replaced by new-world . Nix4Loong targets new-world LoongArch exclusively, ensuring our work aligns with international open-source standards and delivers the authentic NixOS and Nixpkgs experience to LoongArch users.
Project Goals
Nix4Loong aims to:
- Provide NixOS installation images for LoongArch
- Ensure a certain proportion of Nixpkgs packages working on LoongArch
- Offer and maintain binary caches for LoongArch Nixpkgs
- Build bridges to enable the Nix community to participate in the development of the LoongArch ecosystem
Current Progress
Nixpkgs 25.11 “Xantusia” was released on November 30, 2025. According to the Release Notes , initial support for native LoongArch compilation has been completed, with more improvements in progress.
Following the Software Development and Build Convention for LoongArch™ Architectures , this release sets the default march level to la64v1.0, which covers the 3A5000 and newer desktop and server processor series, but does not support platforms without the LSX extension, such as the 2K0300. You can use pkgsCross.loongarch64-linux-embedded to build software and systems for these platforms.
Moving forward, we will continue working on adapting more Nixpkgs packages, continuously improving both the quantity and quality of available packages on LoongArch.
- Get NixOS installation images: Installation
- Join development efforts: Contributing
About the Name and Organization
The project name “Nix4Loong” comes from “Nix For LoongArch” (also written as “nix4loong”). Don’t confuse this with Loongnix , a separate Linux distribution from the Loongson open-source community.
This project is initiated by loongson-community , which is separate from Loongson Technology’s official open-source community and the Loongson Hobbyists’ Community .
Nix4Loong is an independent open-source project with no affiliation to Loongson Technology. All work is done by community volunteers, and we welcome contributions from individuals and organizations alike.