Nix 生态系统

Revision as of 19:47, 28 August 2025 by Weijia (talk | contribs) (Created page with "'''Nix 核心生态系统'''是一组技术的集合,旨在以可复现的方式构建、声明性地配置和管理软件包、系统及其依赖项。它通过将函数式编程范式从程序领域扩展到系统领域来实现这一目标,并使用一种动态的、函数式的、惰性求值的领域特定语言(DSL),即 Nix 语言,来指定可复现的构建过程。")

Nix 核心生态系统是一组技术的集合,旨在以可复现的方式构建、声明性地配置和管理软件包、系统及其依赖项。它通过将函数式编程范式从程序领域扩展到系统领域来实现这一目标,并使用一种动态的、函数式的、惰性求值的领域特定语言(DSL),即 Nix 语言,来指定可复现的构建过程。

In addition there are many other applications (Extended Nix Ecosystem) developed by the Nix community, utilizing and supporting these core technologies.

Official ecosystem

Core Components of the Nix Ecosystem
Component Manual Description Use License
NixOS NixOS Manual A Linux distribution with all components built by Nix, and thus supporting reproducible and declarative system-wide configuration management as well as atomic upgrades and rollbacks. Declaratively configure desktops, servers & clusters MIT
Nixpkgs Nixpkgs Manual The largest community maintained Nix package and NixOS module repository; standard releases of NixOS are hosted here. Share Nix packages & NixOS modules MIT
Hydra Hydra Manual A Nix based continuous build system. CI build farms GPL-3.0
Nix Nix Manual A package manager that parses Nix expressions specifying reproducible build, putting the result in a store address with a hash of the dependency tree, sidestepping dependency hell and supporting multiversion installs and rollbacks. Reproducible builds & package management in Linux & Darwin LGPL-2.1
The NixOS core ecosystem stack
NixOS

A Linux distribution and configuration system built using Nixpkgs

Nixpkgs

A large, community-maintained repository of packages

Hydra

A continuous build system built on Nix

Nix

A pure and functional build system

Usage of NixOS

Users install the NixOS distribution on their computers just as any other Linux distribution. They read about packages to install and configuration options in Nixpgs via https://search.nixos.org and this wiki. They use the Nix language to declaratively describe in a text file what software packages should be installed and how the system should be configured. They run 2 command line programs in a terminal to transform the system into the described system. They use the system as any other Linux system.

Development of NixOS

Developers of NixOS mainly work on Nixpkgs to describe in text files in Nix language how software packages should be build. After peer review these changes are integrated in Nixpkgs. Some of these packages are pre built on Hydra to reduce the update time for NixOS users.