Flakes/zh: Difference between revisions

Weijia (talk | contribs)
Created page with "为了在 flake 项目中允许使用 非自由软件,您需要在导入 Nixpkgs 时通过设置 <code>config.allowUnfree = true;</code> 来明确允许它。"
Weijia (talk | contribs)
Created page with "<syntaxhighlight lang="nix"> { inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; outputs = { self, nixpkgs, flake-compat }: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; config.allowUnfree = true;}; in { ... }; } </syntaxhighlight>"
Tags: Mobile edit Mobile web edit
Line 343: Line 343:
为了在 flake 项目中允许使用 [[Unfree software|非自由软件]],您需要在导入 Nixpkgs 时通过设置 <code>config.allowUnfree = true;</code> 来明确允许它。
为了在 flake 项目中允许使用 [[Unfree software|非自由软件]],您需要在导入 Nixpkgs 时通过设置 <code>config.allowUnfree = true;</code> 来明确允许它。


<div lang="en" dir="ltr" class="mw-content-ltr">
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
{
{
Line 355: Line 354:
     };
     };
}
}
</syntaxhighlight>
</syntaxhighlight>  
</div>  


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