NixOS/zh: Difference between revisions

Weijia (talk | contribs)
Created page with "NixOS 的一个核心特征便是其声明式配置模型,其中整个系统状态 — 包括已安装的软件包、系统服务和设置 — 均在配置文件中描述。主配置文件通常位于 <code>/etc/nixos/configuration.nix</code>。"
Weijia (talk | contribs)
Created page with "配置的更改通过使用 <code>nixos-rebuild switch</code> 原子化应用,从而确保可复现性并能回滚到之前状态。大多数用户使用版本控制系统来追踪配置文件,以实现一致且可移植的系统设置。在其他系统中,这些缺陷通常是事后才通过 Puppet、Ansible 或 Chef 等配置管理解决方案来弥补,甚至完全无法弥补。这些工具将系统配置与预期的状态描述进行协调。然而,其并..."
Line 65: Line 65:
NixOS 的一个核心特征便是其声明式配置模型,其中整个系统状态 — 包括已安装的软件包、系统服务和设置 — 均在配置文件中描述。主配置文件通常位于 <code>/etc/nixos/configuration.nix</code>。
NixOS 的一个核心特征便是其声明式配置模型,其中整个系统状态 — 包括已安装的软件包、系统服务和设置 — 均在配置文件中描述。主配置文件通常位于 <code>/etc/nixos/configuration.nix</code>。


<div lang="en" dir="ltr" class="mw-content-ltr">
配置的更改通过使用 <code>nixos-rebuild switch</code> 原子化应用,从而确保可复现性并能回滚到之前状态。大多数用户使用版本控制系统来追踪配置文件,以实现一致且可移植的系统设置。在其他系统中,这些缺陷通常是事后才通过 Puppet、Ansible 或 Chef 等配置管理解决方案来弥补,甚至完全无法弥补。这些工具将系统配置与预期的状态描述进行协调。然而,其并未集成到操作系统的设计中,而只是简单地叠加在操作系统之上。因此,当操作系统配置的某个方面未在预期状态描述中指定时,其配置仍然可能会有所不同。
Changes to the configuration are applied atomically using <code>nixos-rebuild switch</code>, ensuring reproducibility and the ability to roll back to previous states. Most users track their configuration files in a version control system, enabling consistent and portable system setups. These shortcomings are often rectified after-the-fact if at all by configuration management solutions such as Puppet, Ansible or Chef. These tools reconcile system configuration with a description of the expected state. However, these tools are not integrated into the operating system design and are simply layered on top, and OS configuration may still vary where an aspect of OS configuration has not been specified in the description of expected state.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">