FAQ/zh-cn: Difference between revisions

Created page with "我们在曾尝试在几年里多次通过多种方式(email, matrix)提交问题,但从未得到直接的回复。最后一次接触的尝试是由zimbatm代表nixos基金会,询问是否能在新wiki上展开合作。得到了否定的回答。由于旧wiki的情况不断的恶化和维护者拒绝回应,将内容分叉到一个新的维基中是现在唯一的解决方法。"
Moraxyc (talk | contribs)
Created page with "<syntaxhighlight lang="bash"> nix-env --list-generations -p /nix/var/nix/profiles/per-user/root/channels 18 2014-04-17 09:16:28 19 2014-06-13 10:31:24 20 2014-08-12 19:09:20 (current) </syntaxhighlight> 回滚到上一代的方法如下:"
Tags: Mobile edit Mobile web edit
 
(14 intermediate revisions by 3 users 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?noxos.wiki怎么了? ==
== 为什么创建了一个新的 wiki?nixos.wiki 怎么了? ==


nixos上的旧wiki有一些问题:
旧的 wiki(nixos.wiki)存在以下几个问题:


* 许多组件(mediawiki, php, icu)已经结束生命周期很久了。
* 许多组件(MediaWiki、PHP、ICU)严重过时。
** MediaWiki 1.29 (EOL 2018), 现在 1.35 (EOL 2023-12)
** MediaWiki 1.29(生命周期结束于 2018 年),当前版本为 1.35(生命周期结束于 2023 12 月)
** PHP 7.3.33 (EOL 2021-12)
** PHP 7.3.33(生命周期结束于 2021 12 月)
** ICU 64.2
** ICU 64.2
* Cloudflare DDOS 防御有时使wiki编辑失效
* Cloudflare 的 DDoS 防御有时会导致 wiki 编辑失败。
* 没有 WYSIWYG 编辑器.
* 没有所见即所得(WYSIWYG)的编辑器。
* 维基基础架构本应在发布后公开,但最终却没有公开。
* wiki 的基础设施本应在上线后公开,但最终未能公开。


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


<div lang="en" dir="ltr" class="mw-content-ltr">
另请参阅:
Also see:
* https://wiki.nixos.org/wiki/User:Winny/WikiRisks
* https://wiki.nixos.org/wiki/User:Winny/WikiRisks
* https://greasyfork.org/en/scripts/495011-redirect-to-wiki-nixos-org (trivial userscript to redirect nixos.wiki links here)
* https://greasyfork.org/en/scripts/495011-redirect-to-wiki-nixos-org(用于将 nixos.wiki 链接重定向到此处的简单用户脚本)
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Why_is_Nix_written_in_C++_rather_than_a_functional_language_like_Haskell?"></span>
== Why is Nix written in C++ rather than a functional language like Haskell? ==
== 为什么 Nix 是用 C++ 编写的,而不是像 Haskell 这样的函数式语言? ==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
主要是因为 Nix 旨在轻量级、易于学习且具有良好的可移植性(零依赖)。
Mainly because Nix is intended to be lightweight, easy to learn, and portable (zero dependencies).
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="How_to_keep_build-time_dependencies_around_/_be_able_to_rebuild_while_being_offline?"></span>
== How to keep build-time dependencies around / be able to rebuild while being offline? ==
== 如何保留构建时依赖 / 在离线状态下重新构建? ==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Line 79: 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 115: 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 130: 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">