Nix 生態系統
Nix 核心生態系統是一組技術的集合,旨在以可復現的方式構建、聲明性地配置和管理軟體包、系統及其依賴項。它通過將函數式編程範式從程序領域擴展到系統領域來實現這一目標,並使用一種動態的、函數式的、惰性求值的領域特定語言(DSL),即 Nix 語言,來指定可復現的構建過程。
此外,還有許多由 Nix 社區開發的應用程式(Nix 擴展生態系統)利用並支持了這些核心技術。
官方生態系統
組件 | 手冊(Manual) | 描述 | 用途 | 協議 |
---|---|---|---|---|
NixOS | NixOS 手冊 | 一個由 Nix 構建所有組件的 Linux 發行版,因此支持可重現的、聲明式的全系統配置管理以及原子升級和回滾。 | 聲明式配置桌面、伺服器和集群。 | MIT |
Nixpkgs | Nixpkgs 手冊 | 最大的社區維護的 Nix 軟體包和 NixOS 模塊倉庫,NixOS 的標準版本也託管在這裡。 | 分享 Nix 軟體包和 NixOS 模塊 | MIT |
Hydra | Hydra 手冊 | 基於 Nix 的持續構建系統 | 持續構建集群 | GPL-3.0 |
Nix | Nix 手冊 | 一款軟體包管理器,能解析指定可重現構建的 Nix 表達式,並將結果與依賴關係樹的哈希值一起放入存儲地址,從而避免依賴關係地獄,並支持多版本安裝和回滾。 | Linux 和 Darwin 中的可重現構建和軟體包管理 | LGPL-2.1 |
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.