mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-03-13 23:58:51 +01:00
[Little Change]:重写关于省略 config
的声明
This commit is contained in:
parent
b38976ad9d
commit
53bfe60ff5
@ -183,9 +183,8 @@ foo 的自定义配置了,示例:
|
||||
}
|
||||
```
|
||||
|
||||
上面这个例子中我们为 `options` 赋值的方式实际上是一种**缩写**,当一个模块中只声明了
|
||||
`options`,而没有声明 `config` (以及其他模块系统的特殊参数)时,我们可以省略掉 `config`
|
||||
前缀,直接使用 `options` 的名称进行赋值。
|
||||
上面这个例子中我们为 `options` 赋值的方式实际上是一种**缩写**,当一个模块中只包含定义(`config`),而没有声明(`option`,并且没有其他特殊参数)时,我们可以省略掉 `config`
|
||||
包装,直接书写 `config` 部分来对其他模块中已声明的 `option` 赋值。
|
||||
|
||||
## 模块系统的赋值与延迟求值 {#module-system-assignment-and-lazy-evaluation}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user