From 17a3f49e30dcea57a94c06785b6cfa2cd88eb050 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Thu, 15 Feb 2024 16:28:24 +0800 Subject: [PATCH] feat: & --- docs/nixos-with-flakes/nixos-with-flakes-enabled.md | 2 +- docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/nixos-with-flakes/nixos-with-flakes-enabled.md b/docs/nixos-with-flakes/nixos-with-flakes-enabled.md index a440b1e..07e3f07 100644 --- a/docs/nixos-with-flakes/nixos-with-flakes-enabled.md +++ b/docs/nixos-with-flakes/nixos-with-flakes-enabled.md @@ -252,7 +252,7 @@ The definition is actually a Nix function, and it has five **automatically gener 1. `lib`: A built-in function library included with nixpkgs, offering many practical functions for operating Nix expressions. - For more information, see . -2. `config`: A set of all config values in the current environment, which may sometimes be used. +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. 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 9584dec..8fe2b44 100644 --- a/docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md +++ b/docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md @@ -249,7 +249,7 @@ sudo nixos-rebuild switch --flake github:owner/repo#your-hostname 1. `lib`: **nixpkgs 自带的函数库,提供了许多操作 Nix 表达式的实用函数** - 详见 -2. `config`: 当前环境中所有 config 值的集合,有时候会用到 +2. `config`: 包含了当前环境中所有 option 的值,在后面学习模块系统时会大量使用它 3. `options`: 当前环境中所有 Modules 中定义的所有 options 的集合 4. `pkgs`: **一个包含所有 nixpkgs 包的集合,它也提供了许多相关的工具函数** - 入门阶段可以认为它的默认值为 `nixpkgs.legacyPackages."${system}"`,可通过 `nixpkgs.pkgs` 这个 option 来自定义 pkgs 的值