FAQ/zh: Difference between revisions

Weijia (talk | contribs)
Created page with "== 如何保留构建时依赖 / 在离线状态下重新构建? =="
Tags: Mobile edit Mobile web edit
Weijia (talk | contribs)
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 7: Line 7:


<span id="Why_is_there_a_new_wiki?_What_is_with_nixos.wiki?"></span>
<span id="Why_is_there_a_new_wiki?_What_is_with_nixos.wiki?"></span>
== 为什么创建了一个新的 wiki?nixos.wiki 怎么了? ==
== 为什么创建了一个新的维基?nixos.wiki 怎么了? ==


旧的 wiki(nixos.wiki)存在以下几个问题:
旧的 wiki(nixos.wiki)存在以下几个问题:
Line 15: Line 15:
** PHP 7.3.33(生命周期结束于 2021 年 12 月)
** PHP 7.3.33(生命周期结束于 2021 年 12 月)
** ICU 64.2
** ICU 64.2
* Cloudflare 的 DDoS 防御有时会导致 wiki 编辑失败。
* Cloudflare 的 DDoS 防御有时会导致维基编辑失败。
* 没有所见即所得(WYSIWYG)的编辑器。
* 没有所见即所得(WYSIWYG)的编辑器。
* wiki 的基础设施本应在上线后公开,但最终未能公开。
* 维基的基础设施本应在上线后公开,但最终未能公开。


我们曾通过多种渠道(电子邮件、Matrix)多次尝试解决这些问题,历时多年,但始终未能得到直接答复。最后一次联系是由 zimbatm 代表 NixOS 基金会与维护者沟通,询问关于新 wiki 合作的可能性。答案是否定的。随着旧 wiki 不断恶化且维护者未作回应,将内容分叉到一个新 wiki 成为了唯一的解决方法。
我们曾通过多种渠道(电子邮件、Matrix)多次尝试解决这些问题,历时多年,但始终未能得到直接答复。最后一次联系是由 zimbatm 代表 NixOS 基金会与维护者沟通,询问关于新维基合作的可能性。答案是否定的。随着旧维基不断恶化且维护者未作回应,将内容分叉到一个新维基成为了唯一的解决方法。


另请参阅:
另请参阅:
Line 73: Line 73:
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Why_-_instead_of_-?"></span>
== Why <hash>-<name> instead of <name>-<hash>? ==
== 为什么使用 <hash>-<name> 而不是 <name>-<hash>==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
在少数需要深入查看 /nix/store 的情况下,将哈希值的前几位放在开头更方便记忆和使用。
For the rare cases where we have to dig into the /nix/store it is more practical to keep in mind the first few letters at the beginning than finding a package by name.
也就是说,几乎可以仅通过哈希的前 4-5 个字符唯一地识别一个存储路径。
Ie, you can uniquely identify almost any storepath with just the first 4-5 characters of the hash.
(这比先输入完整的包名再加上哈希的前几位要更高效。)
(Rather than having to type out the full package name, then 4-5 characters of the hash.)
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
此外,由于开头部分长度一致,查看一系列软件包列表时在视觉上也更容易解析。
Also, since the initial part is all of the same length, visually parsing a list of packages is easier.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Line 109: Line 104:
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="I&#039;ve_updated_my_channel_and_something_is_broken,_how_can_I_rollback_to_an_earlier_channel?"></span>
== I've updated my channel and something is broken, how can I rollback to an earlier channel? ==
== 我更新了我的 channel,但出现了问题,如何回滚到之前的 channel==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
查看可用的各代 channel
View the available generations of your channel:
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
nix-env --list-generations -p /nix/var/nix/profiles/per-user/root/channels
nix-env --list-generations -p /nix/var/nix/profiles/per-user/root/channels
Line 124: Line 115:
20  2014-08-12 19:09:20  (current)
20  2014-08-12 19:09:20  (current)
</syntaxhighlight>
</syntaxhighlight>
To rollback to the previous generation:
回滚到上一代的方法如下:
</div>


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