Flakes/zh: Difference between revisions

Ardenet (talk | contribs)
Created page with "为了推导 flake,您可以覆盖 <code>nix.conf</code> 文件中设置的全局 Nix 配置。例如,这可用于设置特定项目的二进制缓存源,同时保持全局配置不变。Flake 文件中可包含一个 nixConfig 属性,并在其中设置相关配置。例如,启用 nix-community 二进制缓存可以通过以下方式实现:"
Ardenet (talk | contribs)
No edit summary
Line 51: Line 51:
}</nowiki>|name=flake.nix|lang=nix}}
}</nowiki>|name=flake.nix|lang=nix}}


<div lang="en" dir="ltr" class="mw-content-ltr">
{{Note|如果您习惯通过 NixOS 配置来设置 Nix 配置,则这些选项位于 <code>nix.settings</code> 下,而不是 <code>nix</code> 下。例如,您无法在 <code>nix.optimization.enable</code> 下指定自动存储优化。}}
{{Note|If you are used to configuring your Nix settings via the NixOS configuration, these options are under <code>nix.settings</code> and not <code>nix</code>. For example, you cannot specify the automatic storage optimisation under <code>nix.optimisation.enable</code>.}}
</div>


<span id="Setup"></span>
<span id="Setup"></span>
Line 107: Line 105:


<span id="The_nix_flakes_command"></span>
<span id="The_nix_flakes_command"></span>
<div class="mw-translate-fuzzy">
=== Nix Flakes 命令 ===
=== Nix Flakes 命令 ===
{{Main|Nix (command)}}
</div>


{{Main|Nix (command)}}
{{Main|Nix (command)}}