Nix (package manager)/zh: Difference between revisions

Mayer (talk | contribs)
Created page with "=== Profiles(系统画像) ==="
Mayer (talk | contribs)
Created page with "为了建构一个连贯的用户或系统环境, Nix将Nix存储库中的条目符号链接到''profile''. 这些是Nix允许回滚的"前端": 因为存储库是不可变的, 而且以前的profile版本被保留了下来, 回到更早的状态只需要简单地让符号链接指向一个先前的profile. 更精确地说, Nix将二进制文件符号链接到Nix存储库中描述用户环境的条目中. 这些用户环境随之被符号链接到<code>/nix/var/nix/profi..."
Line 33: Line 33:
=== Profiles(系统画像) ===
=== Profiles(系统画像) ===


<div lang="en" dir="ltr" class="mw-content-ltr">
为了建构一个连贯的用户或系统环境, Nix将Nix存储库中的条目符号链接到''profile''. 这些是Nix允许回滚的"前端": 因为存储库是不可变的, 而且以前的profile版本被保留了下来, 回到更早的状态只需要简单地让符号链接指向一个先前的profile. 更精确地说, Nix将二进制文件符号链接到Nix存储库中描述用户环境的条目中. 这些用户环境随之被符号链接到<code>/nix/var/nix/profiles</code>中带有标签的profile, 而这些profile又被符号链接到用户的<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">