diff --git a/docs/nixos-with-flakes/nixos-with-flakes-enabled.md b/docs/nixos-with-flakes/nixos-with-flakes-enabled.md index 2357dbf..42bee92 100644 --- a/docs/nixos-with-flakes/nixos-with-flakes-enabled.md +++ b/docs/nixos-with-flakes/nixos-with-flakes-enabled.md @@ -260,7 +260,7 @@ The definition is actually a Nix function, and it has five **automatically gener 2. `config`: A set of all options' values in the current environment, which will be used extensively in the subsequent section on the module system. 3. `options`: A set of all options defined in all Modules in the current environment. 4. `pkgs`: A collection containing all nixpkgs packages, along with several related utility functions. - - At the beginner stage, you can consider its default value to be `nixpkgs.legacyPackages."${system}"`, and the value of `nixpkgs.pkgs` can be customized through the `nixpkgs.pkgs` option. + - At the beginner stage, you can consider its default value to be `nixpkgs.legacyPackages."${system}"`, and the value of `pkgs` can be customized through the `nixpkgs.pkgs` option. 5. `modulesPath`: A parameter available only in NixOS, which is a path pointing to [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/nixos-23.11/nixos/modules). - It is defined in [nixpkgs/nixos/lib/eval-config-minimal.nix#L43](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/lib/eval-config-minimal.nix#L43). - It is typically used to import additional NixOS modules and can be found in most NixOS auto-generated `hardware-configuration.nix` files. diff --git a/docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md b/docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md index 152fc33..4f0d558 100644 --- a/docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md +++ b/docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md @@ -259,7 +259,7 @@ sudo nixos-rebuild switch --flake github:owner/repo#your-hostname 2. `config`: 包含了当前环境中所有 option 的值,在后面学习模块系统时会大量使用它 3. `options`: 当前环境中所有 Modules 中定义的所有 options 的集合 4. `pkgs`: **一个包含所有 nixpkgs 包的集合,它也提供了许多相关的工具函数** - - 入门阶段可以认为它的默认值为 `nixpkgs.legacyPackages."${system}"`,可通过 `nixpkgs.pkgs` 这个 option 来自定义 pkgs 的值 + - 入门阶段可以认为它的默认值为 `nixpkgs.legacyPackages."${system}"`,可通过 `nixpkgs.pkgs` 这个 option 来自定义 `pkgs` 的值 5. `modulesPath`: 一个只在 NixOS 中可用的参数,是一个 Path,指向 [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/nixos-23.11/nixos/modules) - 它在 [nixpkgs/nixos/lib/eval-config-minimal.nix#L43](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/lib/eval-config-minimal.nix#L43) 中被定义 - 通常被用于导入一些额外的 NixOS 模块,NixOS 自动生成的 `hardware-configuration.nix` 中基本都能看到它