Nix (package manager)/zh-hans: Difference between revisions

Loxodoromy (talk | contribs)
Created page with "=== 配置文件(Profiles) ==="
Loxodoromy (talk | contribs)
Created page with "为了搭建一致的用户或系统环境,Nix将Nix存储的条目符号链接到''配置文件''。这是Nix允许回滚功能的前端:由于存储不可变,先前版本的配置文件被保留,恢复到更早的状态只需要改变符号链接到先前的配置文件。更精确地说,Nix将二进制文件符号链接到Nix存储中表示用户环境的条目。这些用户环境随之被符号链接到<code>/nix/var/nix/profiles</code>里被标记的配..."
Line 52: Line 52:
=== 配置文件(Profiles) ===
=== 配置文件(Profiles) ===


<div lang="en" dir="ltr" class="mw-content-ltr">
为了搭建一致的用户或系统环境,Nix将Nix存储的条目符号链接到''配置文件''。这是Nix允许回滚功能的前端:由于存储不可变,先前版本的配置文件被保留,恢复到更早的状态只需要改变符号链接到先前的配置文件。更精确地说,Nix将二进制文件符号链接到Nix存储中表示用户环境的条目。这些用户环境随之被符号链接到<code>/nix/var/nix/profiles</code>里被标记的配置文件,后者又被符号链接到该用户的<code>~/.nix-profile</code>
In order to construct a coherent user or system environment, Nix symlinks entries of the Nix store into ''profiles''. These are the front-end by which Nix allows rollbacks: since the store is immutable and previous versions of profiles are kept, reverting to an earlier state is simply a matter of change the symlink to a previous profile. To be more precise, Nix symlinks binaries into entries of the Nix store representing the user environments. These user environments are then symlinked into labeled profiles stored in <code>/nix/var/nix/profiles</code>, which are in turn symlinked to the user's <code>~/.nix-profile</code>.
</div>


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