Nix生态

From NixOS Wiki
Revision as of 11:06, 30 August 2024 by MorningstarSunset (talk | contribs) (Created page with "{| class="wikitable" |+ Nix 生态核心组件 |- ! 组件 ! 手册(Manual) ! 描述 ! 用途 ! 协议 |- | NixOS | [https://nixos.org/nixos/manual/ NixOS Manual] | 一个由 Nix 构建''所有''组件的 Linux 发行版,因此支持可重现的、声明式的全系统配置管理以及原子升级和回滚。 | 声明式配置桌面、服务器和集群。 | MIT |- | Nixpkgs | [https://nixos.org/nixpkgs/manual/ Nixpkgs Manual] | 最大的社区维护的 Nix...")

“Nix核心生态”是一组技术,旨在以可重复的方式构建、声明式配置和管理软件包和系统及其依赖项。它通过利用名为Nix Language的动态、函数式和惰性求值的领域特定语言(DSL)将函数式编程范式从程序转换为系统来实现这一点,用于指定可重现的软件建构。

此外,Nix社区开发了许多其他的 应用程序 (“Nix扩展生态”),这些应用程序使用并为核心技术提供支持。

官方生态

Nix 生态核心组件
组件 手册(Manual) 描述 用途 协议
NixOS NixOS Manual 一个由 Nix 构建所有组件的 Linux 发行版,因此支持可重现的、声明式的全系统配置管理以及原子升级和回滚。 声明式配置桌面、服务器和集群。 MIT
Nixpkgs Nixpkgs Manual 最大的社区维护的 Nix 软件包和 NixOS 模块仓库,NixOS的标准发行版也托管在这里。 分享 Nix 软件包和 NixOS 模块 MIT
Hydra Hydra Manual 基于 Nix 的持续构建系统 CI build farms GPL-3.0
Nix Nix Manual 一款软件包管理器,能解析指定可重现构建的 Nix 表达式,并将结果与依赖关系树的哈希值一起放入存储地址,从而避免依赖关系地狱,并支持多版本安装和回滚。 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.