Jump to content

Nix 生態系統

From NixOS Wiki
Revision as of 12:48, 8 March 2025 by X807x (talk | contribs)

「核心 Nix 生態」是一套技術集合,旨在可重現的方式建立、宣告式配置與管理套件、系統及其相依性。它透過將程式從函數模式轉換成可被系統領域運用的動態、函數式且具備延遲求值特性的領域特定語言 —— Nix 語言,專門用於可重現的方式建立。

此外,有許多其他的 應用程式 (延伸 Nix 生態系統) 由 Nix 社群所開發、使用及支持的核心科技。

官方生態系統

Core Components of the Nix Ecosystem
零件 (Component) 手冊 說明 用途 授權協定 (License)
NixOS NixOS 手冊 一個完全由 Nix 構成 Linux 發行版,因此支持可重建的宣告式系統級設定管理,同時也支持原子升級 (atomic upgrade) 和回朔 (rollback)。 宣告式設定的桌面電腦、伺服器和叢集 MIT
Nixpkgs Nixpkgs 手冊 由社群維護最大的 Nix 軟體套件和 NixOS 模組的軟體庫;標準釋出的 NixOS 也在此。 分享 Nix 轉體套件 & NixOS 模組 MIT
Hydra Hydra 手冊 基於 Nix 的持續修建系統 (continuous build system)。 CI 建立叢集 GPL-3.0
Nix Nix 手冊 一個軟體套件管理器會分析 Nix 表達式專門用於可重複的建立,並將結果放在店的地址上,包含依賴套件樹的雜湊,避開套件相依性地獄和支援多版本安裝和回朔。 在 Linux & Darwin 中,可重現的建立及套件管理 LGPL-2.1
NixOS 核心生態結構
NixOS

一個由 Nixpkgs 建成的 Linux 發行版及可設定的系統。

Nixpkgs

一個龐大,由社群維護的軟體套件庫

Hydra

一個利用 Nix 建立的持續性修建系統。

Nix

一個完全函式化建立的系統。

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.