NixOS/zh: Difference between revisions

Weijia (talk | contribs)
Created page with "Switch generations: <syntaxHighlight lang=shell> # 以 root 用户身份切换至 204 世代 $ nix-env --profile /nix/var/nix/profiles/system --switch-generation 204 </syntaxHighlight>"
Weijia (talk | contribs)
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 29: Line 29:


<span id="32-bit_x86_architectures"></span>
<span id="32-bit_x86_architectures"></span>
==== 32位 x86 架构 ====
==== 32 位 x86 架构 ====


于32位 x86 架构(即 <code>i686</code>)的支持正在减少。大多数包仍然可以编译和运行,但它们的缓存可用性显著降低<ref>https://discourse.nixos.org/t/limited-cache-availability-for-i686-32-bits-x86-architecture/37626</ref>。32位 x86 架构不再提供预构建的 ISO 镜像文件,但其仍可手动构建。
于 32 位 x86 架构即 <code>i686</code>的支持正在减少。大多数包仍然可以编译和运行,但它们的缓存可用性显著降低<ref>https://discourse.nixos.org/t/limited-cache-availability-for-i686-32-bits-x86-architecture/37626</ref>。32 位 x86 架构不再提供预构建的 ISO 镜像文件,但其仍可手动构建。


<span id="64-bit_x86_architectures"></span>
<span id="64-bit_x86_architectures"></span>
==== 64位 x86 架构 ====
==== 64 位 x86 架构 ====


大多数 <code>x86_64</code> 设备都能顺利运行 NixOS。
大多数 <code>x86_64</code> 设备都能顺利运行 NixOS。


<span id="32-bit_ARM_architectures"></span>
<span id="32-bit_ARM_architectures"></span>
==== 32位 ARM 架构 ====
==== 32 位 ARM 架构 ====


{{Main|NixOS on ARM}}
{{Main|NixOS on ARM}}
Line 45: Line 45:


<span id="64-bit_ARM_architectures"></span>
<span id="64-bit_ARM_architectures"></span>
==== 64位 ARM 架构 ====
==== 64 位 ARM 架构 ====


{{Main|NixOS on ARM}}
{{Main|NixOS on ARM}}
Line 187: Line 187:
</syntaxHighlight>
</syntaxHighlight>


<div lang="en" dir="ltr" class="mw-content-ltr">
delete broken generation(s):
delete broken generation(s):
<syntaxHighlight lang=shell>
<syntaxHighlight lang=shell>
# as root delete broken generations 205 and 206  
# root 用户身份删除损坏的 205 206 世代
$ nix-env --profile /nix/var/nix/profiles/system --delete-generations 205 206
$ nix-env --profile /nix/var/nix/profiles/system --delete-generations 205 206
</syntaxHighlight>
</syntaxHighlight>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
您可以通过设置 <code>/etc/nixos/configuration.nix</code> 中的 [https://search.nixos.org/options?query=nix.gc nix.gc] 选项来配置自动垃圾回收。这是推荐操作,因为它可以降低 Nix Store 的大小。
You can configure automatic garbage collection by setting the [https://search.nixos.org/options?query=nix.gc nix.gc] options in <code>/etc/nixos/configuration.nix</code>. This is recommended, as it keeps the size of the Nix store down.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="See_also"></span>
== See also ==
== 另见 ==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
* [[Special:MyLanguage/NixOS modules|NixOS 模块]] - 一个用于模块化 [[Special:MyLanguage/Overview of the Nix Expression Language#Expressions|Nix 表达式]]的库,为 [[#declarative-configuration|NixOS 的声明式配置]] 提供支持。
* [[Special:MyLanguage/NixOS modules|NixOS modules]], a library for modular [[Special:MyLanguage/Overview of the Nix Expression Language#Expressions|Nix expressions]] which powers [[#declarative-configuration|the declarative configuration of NixOS]].
* [[Special:MyLanguage/NixOS VM tests|NixOS VM 测试]] - 一个基于  [[Special:MyLanguage/Nixpkgs|Nixpkgs]][[Special:MyLanguage/NixOS|NixOS]]、QEMU 和 Perl 用于创建可复现基础设施测试的库。
* [[Special:MyLanguage/NixOS VM tests|NixOS VM tests]], a library for creating reproducible infrastructure tests, based on [[Special:MyLanguage/Nixpkgs|Nixpkgs]], [[Special:MyLanguage/NixOS|NixOS]], QEMU and Perl.
* [https://github.com/ryan4yin/nixos-and-flakes-book NixOS & Flakes Book] (Ryan4yin, 2023) - 🛠️ ❤️ 一本非官方的 NixOS & Flakes 新手入门书籍。
* [https://github.com/ryan4yin/nixos-and-flakes-book NixOS & Flakes Book] (Ryan4yin, 2023) - 🛠️ ❤️ An unofficial NixOS & Flakes book for beginners.
</div>


[[Category:Pedias]]
[[Category:Pedias]]
[[Category:NixOS]]
[[Category:NixOS]]
[[Category:Nix{{#translation:}}]]
[[Category:Nix{{#translation:}}]]