Jump to content

Translations:Nix (package manager)/14/zh: Difference between revisions

From Official NixOS Wiki
Mayer (talk | contribs)
Created page with "为了建构一个连贯的用户或系统环境, Nix将Nix存储库中的条目符号链接到''profile''. 这些是Nix允许回滚的"前端": 因为存储库是不可变的, 而且以前的profile版本被保留了下来, 回到更早的状态只需要简单地让符号链接指向一个先前的profile. 更精确地说, Nix将二进制文件符号链接到Nix存储库中描述用户环境的条目中. 这些用户环境随之被符号链接到<code>/nix/var/nix/profi..."
 
Weijia (talk | contribs)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
了建个连贯的用户或统环, Nix将Nix存储库中的目符号链接到''profile''. 这些是Nix允许"前端": 因为存储库是不可, 而的profile版本被保留了下来, 回更早状态只需要简单号链接指向一个先前的profile. 更精说, Nix将进制文件号链接到Nix存储库描述户环境的目中. 这些用户环随之被符号链接到<code>/nix/var/nix/profiles</code>中带有标签的profile, 这些profile又被号链接到用的<code>~/.nix-profile</code>.
建一個一致的用戶和統環,Nix 會將 Nix store 中的目符號連結到 ''profiles'' 中。這是 Nix 實現的前端:由於 store 是不可的且保留先前版本的 profile,將系統還原先前狀態只需簡單號連結更改為先前的 profile。更精說,Nix 將進位檔號連結到 Nix store 代表戶環境的目中。這些用戶環隨後被符號連結儲存在 <code>/nix/var/nix/profiles</code> 被標注的 profile,它們則進一步號連結使的 <code>~/.nix-profile</code>

Latest revision as of 21:28, 28 August 2025

Message definition (Nix (package manager))
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>.

為了構建一個一致的用戶和系統環境,Nix 會將 Nix store 中的條目符號連結到 profiles 中。這是 Nix 實現回滾的前端:由於 store 是不可變的且保留先前版本的 profile,將系統還原到先前的狀態只需簡單地將符號連結更改為先前的 profile。更精確地說,Nix 將二進位檔符號連結到 Nix store 中代表用戶環境的條目中。這些用戶環境隨後被符號連結到儲存在 /nix/var/nix/profiles 中被標注的 profile,而它們則進一步符號連結到使用者的 ~/.nix-profile