Nix (package manager)/zh: Difference between revisions
No edit summary |
No edit summary |
||
| Line 61: | Line 61: | ||
</div> | </div> | ||
=== Profiles === | |||
=== Profiles | |||
为了建构一个连贯的用户或系统环境, Nix将Nix存储库中的条目符号链接到''profile''. 这些是Nix允许回滚的"前端": 因为存储库是不可变的, 而且以前的profile版本被保留了下来, 回到更早的状态只需要简单地让符号链接指向一个先前的profile. 更精确地说, Nix将二进制文件符号链接到Nix存储库中描述用户环境的条目中. 这些用户环境随之被符号链接到<code>/nix/var/nix/profiles</code>中带有标签的profile, 而这些profile又被符号链接到用户的<code>~/.nix-profile</code>. | 为了建构一个连贯的用户或系统环境, Nix将Nix存储库中的条目符号链接到''profile''. 这些是Nix允许回滚的"前端": 因为存储库是不可变的, 而且以前的profile版本被保留了下来, 回到更早的状态只需要简单地让符号链接指向一个先前的profile. 更精确地说, Nix将二进制文件符号链接到Nix存储库中描述用户环境的条目中. 这些用户环境随之被符号链接到<code>/nix/var/nix/profiles</code>中带有标签的profile, 而这些profile又被符号链接到用户的<code>~/.nix-profile</code>. | ||