User contributions for Weijia
Appearance
28 August 2025
- 19:2519:25, 28 August 2025 diff hist +220 N Translations:Flakes/195/zh Created page with "<syntaxhighlight lang="console"> $ nix flake show └───packages └───x86_64-linux ├───default: package 'hello-2.12.2' └───hello: package 'hello-2.12.2' </syntaxhighlight>" current
- 19:2519:25, 28 August 2025 diff hist −33 Flakes/zh Created page with "此 flake 生成一个单 Flake 输出 <code>packages</code>。其中,<code>x86_64-linux</code> 是系统特定的属性集。其中包含两个软件包的 Derivations(派生/定义):<code>default</code> 和 <code>hello</code>。您可以使用 {{Nix Manual|name=show 命令|anchor=command-ref/new-cli/nix3-flake-show}} 给出某 flake 的输出,如下所示:"
- 19:2519:25, 28 August 2025 diff hist +388 N Translations:Flakes/194/zh Created page with "此 flake 生成一个单 Flake 输出 <code>packages</code>。其中,<code>x86_64-linux</code> 是系统特定的属性集。其中包含两个软件包的 Derivations(派生/定义):<code>default</code> 和 <code>hello</code>。您可以使用 {{Nix Manual|name=show 命令|anchor=command-ref/new-cli/nix3-flake-show}} 给出某 flake 的输出,如下所示:" current
- 19:2519:25, 28 August 2025 diff hist −68 Flakes/zh Created page with "{{ic|nix flake}} 的子命令在 {{Nix Manual|name=Nix 手册命令参考页面|anchor=command-ref/new-cli/nix3-flake}} 中被描述。"
- 19:2519:25, 28 August 2025 diff hist +135 N Translations:Flakes/65/zh Created page with "{{ic|nix flake}} 的子命令在 {{Nix Manual|name=Nix 手册命令参考页面|anchor=command-ref/new-cli/nix3-flake}} 中被描述。" current
- 19:2519:25, 28 August 2025 diff hist −61 Flakes/zh Created page with "=== Nix Flakes 命令 === {{Main|Nix (command)}}" Tags: Mobile edit Mobile web edit
- 19:2519:25, 28 August 2025 diff hist +48 N Translations:Flakes/64/zh Created page with "=== Nix Flakes 命令 === {{Main|Nix (command)}}"
- 19:2519:25, 28 August 2025 diff hist −41 Flakes/zh Created page with "因此,如果您使用 <code>git</code> 管理您的 flake,请确保在首次创建之后使用 <code>git add</code>添加所有项目文件。}}"
- 19:2519:25, 28 August 2025 diff hist +149 N Translations:Flakes/22/zh Created page with "因此,如果您使用 <code>git</code> 管理您的 flake,请确保在首次创建之后使用 <code>git add</code>添加所有项目文件。}}" current
- 19:2519:25, 28 August 2025 diff hist −56 Flakes/zh Created page with "{{Note | 对于 Git 仓库中的 flakes,只有工作区中的文件才会被复制到 Store 中。" Tags: Mobile edit Mobile web edit
- 19:2519:25, 28 August 2025 diff hist +104 N Translations:Flakes/146/zh Created page with "{{Note | 对于 Git 仓库中的 flakes,只有工作区中的文件才会被复制到 Store 中。" current
- 19:2519:25, 28 August 2025 diff hist −45 Flakes/zh Created page with "{{Warning | 由于 flake 文件的内容会被复制到全局可读的 Nix Store 目录下,所以请不要在 flake 文件中写入任何未加密的秘密信息。您应该改用 秘密管理方案。}}"
- 19:2519:25, 28 August 2025 diff hist +281 N Translations:Flakes/20/zh Created page with "{{Warning | 由于 flake 文件的内容会被复制到全局可读的 Nix Store 目录下,所以请不要在 flake 文件中写入任何未加密的秘密信息。您应该改用 秘密管理方案。}}" current
- 19:2519:25, 28 August 2025 diff hist −30 Flakes/zh Created page with "== 用法 =="
- 19:2519:25, 28 August 2025 diff hist +12 N Translations:Flakes/17/zh Created page with "== 用法 ==" current
- 19:2519:25, 28 August 2025 diff hist −54 Flakes/zh Created page with "添加如下内容至 <code>~/.config/nix/nix.conf</code> 或 <code>/etc/nix/nix.conf</code>:"
- 19:2519:25, 28 August 2025 diff hist +93 N Translations:Flakes/15/zh Created page with "添加如下内容至 <code>~/.config/nix/nix.conf</code> 或 <code>/etc/nix/nix.conf</code>:" current
- 19:2519:25, 28 August 2025 diff hist −20 Flakes/zh Created page with "====Nix 独立程序===="
- 19:2519:25, 28 August 2025 diff hist +24 N Translations:Flakes/13/zh Created page with "====Nix 独立程序====" current
- 19:2519:25, 28 August 2025 diff hist −54 Flakes/zh Created page with "添加如下内容至您的 home manager 配置:" Tags: Mobile edit Mobile web edit
- 19:2519:25, 28 August 2025 diff hist +65 N Translations:Flakes/11/zh Created page with "添加如下内容至您的 home manager 配置:" current
- 19:2419:24, 28 August 2025 diff hist −56 Flakes/zh Created page with "====Home Manager====" Tags: Mobile edit Mobile web edit
- 19:2419:24, 28 August 2025 diff hist +20 N Translations:Flakes/10/zh Created page with "====Home Manager====" current
- 19:2419:24, 28 August 2025 diff hist −66 Flakes/zh Created page with "添加如下内容至 NixOS 配置:"
- 19:2419:24, 28 August 2025 diff hist +128 N Translations:Flakes/8/zh Created page with "添加如下内容至 NixOS 配置:" current
- 19:2419:24, 28 August 2025 diff hist −56 Flakes/zh Created page with "==== NixOS ===="
- 19:2419:24, 28 August 2025 diff hist +15 N Translations:Flakes/7/zh Created page with "==== NixOS ====" current
- 19:2419:24, 28 August 2025 diff hist −17 Flakes/zh Created page with "=== 永久启用 Flakes ==="
- 19:2419:24, 28 August 2025 diff hist +27 N Translations:Flakes/193/zh Created page with "=== 永久启用 Flakes ===" current
- 19:2419:24, 28 August 2025 diff hist −61 Flakes/zh Created page with "当使用任意 <code>nix</code> 命令时,添加如下命令行参数:" Tags: Mobile edit Mobile web edit
- 19:2419:24, 28 August 2025 diff hist +91 N Translations:Flakes/6/zh Created page with "当使用任意 <code>nix</code> 命令时,添加如下命令行参数:" current
- 19:2419:24, 28 August 2025 diff hist −17 Flakes/zh Created page with "=== 临时启用 Flakes ==="
- 19:2419:24, 28 August 2025 diff hist +27 N Translations:Flakes/5/zh Created page with "=== 临时启用 Flakes ===" current
- 19:2419:24, 28 August 2025 diff hist −30 Flakes/zh Created page with "== 设置 ==" Tags: Mobile edit Mobile web edit
- 19:2419:24, 28 August 2025 diff hist +12 N Translations:Flakes/192/zh Created page with "== 设置 ==" current
- 19:2419:24, 28 August 2025 diff hist −191 Flakes/zh Created page with "=== Nix 配置 === 为了推导 flake,您可以覆盖 <code>nix.conf</code> 文件中设置的全局 Nix 配置。例如,这可用于设置特定项目的二进制缓存源,同时保持全局配置不变。Flake 文件中可包含一个 nixConfig 属性,并在其中设置相关配置。例如,启用 nix-community 二进制缓存可以通过以下方式实现: {{File|3=<nowiki>{ ... nixConfig = { extra-substituters = [ "https://nix-community.cach..."
- 19:2419:24, 28 August 2025 diff hist +853 N Translations:Flakes/191/zh Created page with "=== Nix 配置 === 为了推导 flake,您可以覆盖 <code>nix.conf</code> 文件中设置的全局 Nix 配置。例如,这可用于设置特定项目的二进制缓存源,同时保持全局配置不变。Flake 文件中可包含一个 nixConfig 属性,并在其中设置相关配置。例如,启用 nix-community 二进制缓存可以通过以下方式实现: {{File|3=<nowiki>{ ... nixConfig = { extra-substituters = [ "https://nix-community.cach..."
- 19:2419:24, 28 August 2025 diff hist −78 Flakes/zh Created page with "}; }</nowiki>|name=flake.nix|lang=nix}} 在上述示例中,您可以看到对该 flake 的'''描述'''、指定为某 Github 仓库特定分支的'''输入'''(此为 <code>nixos/nixpkgs</code> 仓库的 <code>nixos-unstable</code> 分支)以及一个使用该输入的'''输出'''。该输出简单地指定了该 flake 包含一个用于 x86_64 架构名为 <code>hello</code> 的包。即使您的 flake 输出不使用其输入(尽管这在实践中极不可能)..."
- 19:2419:24, 28 August 2025 diff hist +657 N Translations:Flakes/190/zh Created page with "}; }</nowiki>|name=flake.nix|lang=nix}} 在上述示例中,您可以看到对该 flake 的'''描述'''、指定为某 Github 仓库特定分支的'''输入'''(此为 <code>nixos/nixpkgs</code> 仓库的 <code>nixos-unstable</code> 分支)以及一个使用该输入的'''输出'''。该输出简单地指定了该 flake 包含一个用于 x86_64 架构名为 <code>hello</code> 的包。即使您的 flake 输出不使用其输入(尽管这在实践中极不可能)..."
- 19:2419:24, 28 August 2025 diff hist −56 Flakes/zh Created page with "packages.x86_64-linux.default = self.packages.x86_64-linux.hello;" Tags: Mobile edit Mobile web edit
- 19:2419:24, 28 August 2025 diff hist +65 N Translations:Flakes/189/zh Created page with "packages.x86_64-linux.default = self.packages.x86_64-linux.hello;" current
- 19:2419:24, 28 August 2025 diff hist −56 Flakes/zh Created page with "packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;"
- 19:2319:23, 28 August 2025 diff hist +72 N Translations:Flakes/188/zh Created page with "packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;" current
- 19:2319:23, 28 August 2025 diff hist −56 Flakes/zh Created page with "outputs = { self, nixpkgs }: {"
- 19:2319:23, 28 August 2025 diff hist +30 N Translations:Flakes/187/zh Created page with "outputs = { self, nixpkgs }: {" current
- 19:2319:23, 28 August 2025 diff hist −56 Flakes/zh Created page with "inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; };" Tags: Mobile edit Mobile web edit
- 19:2319:23, 28 August 2025 diff hist +76 N Translations:Flakes/186/zh Created page with "inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; };" current
- 19:2319:23, 28 August 2025 diff hist +7 Flakes/zh Created page with "== Flake 文件结构 == 一个最小化的 flake 文件包含该 flake 的描述(description),一组输入依赖项(inputs)和一个输出(outputs)。您可以随时使用 <code>nix flake init</code> 命令来生成一个非常基础的 flake 文件。这将在当前目录下创建一个名为 <code>flake.nix</code> 的文件,其内容类似于: {{File|3=<nowiki>{ description = "一个非常基础的 flake";"
- 19:2319:23, 28 August 2025 diff hist +432 N Translations:Flakes/185/zh Created page with "== Flake 文件结构 == 一个最小化的 flake 文件包含该 flake 的描述(description),一组输入依赖项(inputs)和一个输出(outputs)。您可以随时使用 <code>nix flake init</code> 命令来生成一个非常基础的 flake 文件。这将在当前目录下创建一个名为 <code>flake.nix</code> 的文件,其内容类似于: {{File|3=<nowiki>{ description = "一个非常基础的 flake";"
- 19:2319:23, 28 August 2025 diff hist −52 Flakes/zh Created page with "Flakes 还允许锁定引用和版本,然后通过 inputs {{cite manual|nix|command-ref/new-cli/nix3-flake-lock|number=7.5.19|title=nix flake lock}}{{cite manual|nix|command-ref/new-cli/nix3-flake-info|number=7.5.17|title=nix flake info}} 以可编程方式进行查询和更新。此外,一个实验性的 CLI 实用程序接受 flake 引用作为参数,该引用指向用于构建、运行和部署软件包的表达式。{{Cite manual|nix|command-ref/new-cli/nix|num..." Tags: Mobile edit Mobile web edit