Nix ecosystem/zh: Difference between revisions

Weijia (talk | contribs)
Created page with "{| style="max-width: 36rem; margin: auto;" |+'''Nix 核心生态系统技术栈''' |style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"| <div style="font-size: 1.3em; font-weight: bold">NixOS</div> 一个用 Nixpkgs 构建的 Linux 发行版和配置系统 ! |- |style="text-align: center; border: 1px solid #ddd; background: #fafafa; padding: 1.6rem" width="2%"| <div style="font-size: 1.3em; font-weight: bold">Nixpkgs</div>..."
Weijia (talk | contribs)
No edit summary
 
(17 intermediate revisions by 2 users not shown)
Line 43: Line 43:
{| style="max-width: 36rem; margin: auto;"
{| style="max-width: 36rem; margin: auto;"
|+'''Nix 核心生态系统技术栈'''
|+'''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>
一个用 Nixpkgs 构建的 Linux 发行版和配置系统
一个用 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>
一个巨大的,社区维护的软件仓库
一个巨大的,社区维护的软件仓库
|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>
一个基于 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>
一个纯函数式的构建系统
一个纯函数式的构建系统
|}
|}


<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>