Nix ecosystem/zh: Difference between revisions

Weijia (talk | contribs)
Created page with "Nix 生态系统"
 
Weijia (talk | contribs)
No edit summary
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<div lang="en" dir="ltr" class="mw-content-ltr">
'''Nix 核心生态系统'''是一组技术的集合,旨在以可复现的方式构建、声明性地配置和管理软件包、系统及其依赖项。它通过将函数式编程范式从程序领域扩展到系统领域来实现这一目标,并使用一种动态的、函数式的、惰性求值的领域特定语言(DSL),即 [[Overview of the Nix Language|Nix 语言]],来指定可复现的构建过程。
The '''Core Nix Ecosystem''' is a collection of technologies designed to reproducibly build and declaratively configure and manage packages and systems as well as their dependencies. It achieves this by translating the functional paradigm from the program to the system domain by utilizing a dynamic, functional and lazy DSL called the [[Overview of the Nix Language|Nix Language]] for specifying reproducible builds.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
此外,还有许多由 Nix 社区开发的[[applications|应用程序]]'''''Nix 扩展生态系统''''')利用并支持了这些核心技术。
In addition there are many other [[applications]] ('''''Extended Nix Ecosystem)''''' developed by the Nix community, utilizing and supporting these core technologies.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Official_ecosystem"></span>
== Official ecosystem ==
== 官方生态系统 ==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
|+ Core Components of the Nix Ecosystem
|+ Nix 生态系统核心组件
|-
|-
! Component
! 组件
! Manual
! 手册(Manual)
! Description
! 描述
! Use
! 用途
! License
! 协议
|-  
|-  
| [[NixOS]]
| [[NixOS]]
| [https://nixos.org/nixos/manual/ NixOS Manual]
| [https://nixos.org/nixos/manual/ NixOS 手册]
| 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.
| 一个由 Nix 构建''所有''组件的 Linux 发行版,因此支持可重现的、声明式的全系统配置管理以及原子升级和回滚。
| Declaratively configure desktops, servers & clusters
| 声明式配置桌面、服务器和集群。
| MIT
| MIT
|-
|-
| [[Nixpkgs]]
| [[Nixpkgs]]
| [https://nixos.org/nixpkgs/manual/ Nixpkgs Manual]
| [https://nixos.org/nixpkgs/manual/ Nixpkgs 手册]
| The largest community maintained Nix package and NixOS module repository; standard releases of NixOS are hosted here.
| 最大的社区维护的 Nix 软件包和 NixOS 模块仓库,NixOS 的标准版本也托管在这里。
| Share Nix packages & NixOS modules
| 分享 Nix 软件包和 NixOS 模块
| MIT
| MIT
|-
|-
| [[Hydra]]
| [[Hydra]]
| [https://nixos.org/hydra/manual/ Hydra Manual]
| [https://nixos.org/hydra/manual/ Hydra 手册]
| A Nix based continuous build system.
| 基于 Nix 的持续构建系统
| CI build farms
| 持续构建集群
| GPL-3.0
| GPL-3.0
|-
|-
| [[Nix]]
| [[Nix]]
| [https://nixos.org/nix/manual/ Nix Manual]
| [https://nixos.org/nix/manual/ Nix 手册]
| 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.
| 一款软件包管理器,能解析指定可重现构建的 Nix 表达式,并将结果与依赖关系树的哈希值一起放入存储地址,从而避免依赖关系地狱,并支持多版本安装和回滚。
| Reproducible builds & package management in Linux & Darwin
| Linux Darwin 中的可重现构建和软件包管理
| LGPL-2.1
| LGPL-2.1
|}
|}  
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
{| style="max-width: 36rem; margin: auto;"
{| style="max-width: 36rem; margin: auto;"
|+'''The NixOS core ecosystem stack'''
|+'''Nix 核心生态系统技术栈'''
|style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"|
|style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%"|
<div style="font-size: 1.3em; font-weight: bold">NixOS</div>
<div style="font-size: 1.3em; font-weight: bold">NixOS</div>
A Linux distribution and configuration system built using Nixpkgs
一个用 Nixpkgs 构建的 Linux 发行版和配置系统
!
!
|-
|-
|style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"|
|style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%"|
<div style="font-size: 1.3em; font-weight: bold">Nixpkgs</div>
<div style="font-size: 1.3em; font-weight: bold">Nixpkgs</div>
A large, community-maintained repository of packages
一个巨大的,社区维护的软件仓库
|style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"|
|style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%"|
<div style="font-size: 1.3em; font-weight: bold">Hydra</div>
<div style="font-size: 1.3em; font-weight: bold">Hydra</div>
A continuous build system built on Nix
一个基于 Nix 的持续构建系统
|-
|-
|style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%" colspan="2"|
|style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%" colspan="2"|
<div style="font-size: 1.3em; font-weight: bold">Nix</div>
<div style="font-size: 1.3em; font-weight: bold">Nix</div>
A pure and functional build system
一个纯函数式的构建系统
|}
|}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
== NixOS 的使用方式 ==
== Usage of NixOS ==
用户可以像安装其他 Linux 发行版一样,将 ''NixOS'' 发行版安装到他们的电脑上。他们通过 https://search.nixos.org 和本维基查阅有关 ''Nixpkgs'' 中可安装的软件包和配置选项的信息。他们使用 ''Nix'' 语言以声明式的方式,在一个文本文件中描述应该安装哪些软件包以及如何配置系统。然后,他们在终端中运行两个命令行程序,将系统转变为所描述的系统。此后,他们像使用任何其他 Linux 系统一样使用该系统。
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.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
== NixOS 的开发 ==
== Development of NixOS ==
''NixOS'' 的开发者主要工作在 ''Nixpkgs'' 上。''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.
 
</div>
* 打包工作在 ''Nixpkgs'' 中进行,并不仅限于 ''NixOS'' 或基于 Linux 的平台。那些不专属于 ''NixOS'' 的软件包(例如运行发行版本身所需的工具)的维护者通常会照顾多个平台,尽管这并非严格要求。
 
* 模块系统是配置运行在 ''NixOS'' 上服务的主要方式。该领域涵盖从“底层”配置(如 ''systemd'' 单元文件或提供自定义内核配置)到为特定服务生成配置文件的各个方面。模块系统是用户配置 ''NixOS'' 的主要途径,并位于 ''Nixpkgs'' 的 <code>nixos/</code> 子目录中。
 
* 文档主要嵌入在打包和模块系统的数据中,尽管独立的 Markdown 文件也包含在 ''Nixpkgs'' 仓库中。文档还包括维护网站、维基以及更广泛生态系统的其他方面。前两个类别几乎完全由 ''Nix'' 语言代码组成,写在文本文件中,而后者则是 ''Nix'' 代码、Markdown 文件及其他各种格式的混合。
 
对 ''Nixpkgs'' 的所有贡献,无论是否影响 ''NixOS'',在被合并到 ''Nixpkgs'' 前都需经过同行评审。许多软件包以及文档和补充材料(如 ISO 或 tarball)会在 ''Hydra'' 上预先构建,以减少 ''NixOS'' 用户的更新等待时间。
 
这三个类别按贡献量来看是最大的,但许多维护者也参与围绕 NixOS 基金会的活动,包括维护网站、''Hydra'' 及其他工具运行所需的基础设施,或开发 NixOS 所需的工具。
 
{| class="wikitable"
|+ ''NixOS'' 开发的各种示例及相关链接
! 开发类型 !! 开发位置 !! 示例
|-
| 平台无关的打包 || ''Nixpkgs'' || [https://github.com/NixOS/nixpkgs/blob/bf3287dac860542719fe7554e21e686108716879/pkgs/tools/misc/coreutils/default.nix coreutils 软件包], [https://github.com/NixOS/nixpkgs/tree/5fe6820251dfab92c84ff356a7c7c336f8d8490c/pkgs/stdenv ''stdenv'' 框架], [https://github.com/NixOS/nixpkgs/blob/5fe6820251dfab92c84ff356a7c7c336f8d8490c/pkgs/applications/office/libreoffice/default.nix Libreoffice 软件包]
|-
| 平台无关的工具 || ''Nixpkgs'' 及其他多个仓库 || [https://github.com/NixOS/nix 上游/默认 Nix 实现 (CppNix)], [https://github.com/NixOS/hydra ''Hydra'' 源代码], [https://github.com/NixOS/nixpkgs-merge-bot ''Nixpkgs'' 合并机器人]
|-
| ''NixOS'' 工具 || 主要是 ''Nixpkgs'' || [https://github.com/NixOS/nixpkgs/tree/5fe6820251dfab92c84ff356a7c7c336f8d8490c/pkgs/by-name/ni/nixos-rebuild-ng nixos-rebuild-ng 源代码], [https://github.com/NixOS/nixpkgs/blob/5fe6820251dfab92c84ff356a7c7c336f8d8490c/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix ''NixOS'' 安装映像]
|-
| ''NixOS'' 模块系统 || ''Nixpkgs'' || [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/display-managers/default.nix 显示管理器配置], [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/databases/mysql.nix MySQL(及其衍生)数据库配置]
|-
| 基础设施 || || [https://github.com/NixOS/nixos-wiki-infra 本维基的基础设施], [https://github.com/NixOS/infra ''NixOS'' 基础设施]
|-
| 文档 || || [https://wiki.nixos.org 本维基], [https://github.com/NixOS/nixpkgs/blob/8d92119c540d78599ba208010c722a60958810f4/doc/stdenv/stdenv.chapter.md ''stdenv'' 文档], [https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/configuration/ipv6-config.section.md ''NixOS'' IPv6 配置](可在 [https://nixos.org/manual/nixos/stable/#sec-ipv6 ''NixOS'' 手册 IPv6 章节] 中查看), [https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md ''Nixpkgs'' 贡献指南]
|-
| 技术组织 || || [https://github.com/NixOS/nixpkgs/issues/390768 ''NixOS'' RelEng], [https://github.com/NixOS/rfcs/ ''Nix'' 和 ''NixOS'' RFC]
|-
| 其他 || || [https://github.com/NixOS/nixos-artwork ''NixOS'' artwork], [https://discourse.nixos.org/ ''NixOS''(及相关)讨论区], [https://github.com/NixOS/foundation ''NixOS 基金会'']
|}


另请参见:[https://github.com/NixOS/org Nix 组织仓库]


<div lang="en" dir="ltr" class="mw-content-ltr">
[[Category:Pedias]]
[[Category:Pedias]]
[[Category:NixOS]]
[[Category:NixOS]]
[[Category:nix]]
[[Category:nix]]
</div>