Skip to Content

Installation

System Requirements

Nix4Loong requires your Loongson processor to meet at minimum the -march=la64v1.0 features from the Toolchain Conventions of the LoongArch™ Architecture , including:

  • 64-bit LoongArch architecture
  • 64-bit floating-point unit (fpu64)
  • Loongson SIMD eXtension (lsx) support

Compatible processors include: 3A5000, 3C5000 series, 3A6000, 3B6000 series, 3C6000 series, 2K3000, and others.

Incompatible processors include: 2K0300 and MIPS-based Loongson processors like 3A4000.

We strongly recommend updating your device’s firmware to the latest version. You can find the firmware in the “Downloads” section on your device’s page at loongfans.cn .

Nix

The Nix package manager runs on mainstream LoongArch Linux distributions like AOSC OS and Arch Linux for Loong64. Your system must use new-world LoongArch .

We recommend using our modified Nix installer based on NixOS/experimental-nix-installer . It automatically configures Nix to use our binary cache, eliminating local package compilation. Use this script to download and run the installer with system checks:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.nix4loong.cn | sh -s -- install

Alternatively, you can manually download the Nix installer:

curl -sL -o nix-installer https://download.nix4loong.cn/nix-installer/latest/nix-installer-loongarch64-linux chmod +x nix-installer ./nix-installer install

You can refer to the Nix4Loong GitHub repository  and the NixOS/experimental-nix-installer repository  for more usage help and additional information.

NixOS

NixOS is a Linux distribution built on Nix. Unlike traditional distributions, NixOS manages your entire system – from kernel parameters to user environments – through Nix’s declarative configuration. For NixOS installation, you need new-world LoongArch  compatibility and UEFI boot support. Most recent Loongson devices (including XA61201 motherboards) meet these requirements. We offer two installation images:

Graphical Installation Image

The graphical image includes desktop applications and a graphical NixOS installer with multiple desktop environment options. It doubles as a Live CD for trying NixOS and Nix.

Minimal Installation Image

The minimal image has no graphical interface and smaller size, requiring command-line installation. See the NixOS Installation Guide .

In-place Install on an Existing System

If booting from an installation image is inconvenient (for example, on a remote VPS), you can use nix4loong-infect  to convert a running LoongArch Linux host in place (AOSC OS, Arch Linux for Loong64, etc.) into NixOS. It is a LoongArch port of elitak/nixos-infect , preconfigured to use the Nix4Loong installer, Nix channel, and binary cache.

Feedback and Suggestions

For installation issues or suggestions, see Contributing.

Last updated on