NixOS/zh: Difference between revisions
Created page with "Switch generations: <syntaxHighlight lang=shell> # 以 root 用户身份切换至 204 世代 $ nix-env --profile /nix/var/nix/profiles/system --switch-generation 204 </syntaxHighlight>" |
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 镜像文件,但其仍可手动构建。 | ||
<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> | ||
delete broken generation(s): | delete broken generation(s): | ||
<syntaxHighlight lang=shell> | <syntaxHighlight lang=shell> | ||
# | # 以 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> | ||
< | 您可以通过设置 <code>/etc/nixos/configuration.nix</code> 中的 [https://search.nixos.org/options?query=nix.gc nix.gc] 选项来配置自动垃圾回收。这是推荐操作,因为它可以降低 Nix Store 的大小。 | ||
< | <span id="See_also"></span> | ||
== | == 另见 == | ||
* [[Special:MyLanguage/NixOS modules|NixOS 模块]] - 一个用于模块化 [[Special:MyLanguage/Overview of the Nix Expression Language#Expressions|Nix 表达式]]的库,为 [[#declarative-configuration|NixOS 的声明式配置]] 提供支持。 | |||
* [[Special:MyLanguage/NixOS modules|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 | * [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) - 🛠️ ❤️ | |||
[[Category:Pedias]] | [[Category:Pedias]] | ||
[[Category:NixOS]] | [[Category:NixOS]] | ||
[[Category:Nix{{#translation:}}]] | [[Category:Nix{{#translation:}}]] |