mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-12-23 23:29:19 +01:00
feat: add TODO
This commit is contained in:
parent
41124e0e16
commit
55134de7d5
10
README.md
10
README.md
@ -4,13 +4,16 @@ An unofficial NixOS & Flakes :book: for beginners: https://nixos-and-flakes.this
|
||||
|
||||
中文版: https://nixos-and-flakes.thiscute.world/zh/
|
||||
|
||||
## TODO
|
||||
|
||||
- Reduce my personal information, make it more general
|
||||
|
||||
## Introduction to Flakes
|
||||
|
||||
The flakes experimental feature is a major development for Nix, it introduces a policy for managing dependencies between Nix expressions, it improves reproducibility, composability and usability in the Nix ecosystem. Although it's still an experimental feature, flakes have been widely used by the Nix community.[^1]
|
||||
|
||||
Flakes is one of the most significant changes the nix project has ever seen.[^2]
|
||||
|
||||
|
||||
## Warning about Flakes
|
||||
|
||||
The benefits of Flakes are obvious, and the entire NixOS community likes it very much. Currently, more than half of the users are using Flakes[^3], so we're pretty sure that Flakes will never be deprecated.
|
||||
@ -19,7 +22,6 @@ The benefits of Flakes are obvious, and the entire NixOS community likes it very
|
||||
|
||||
So overall, I still recommend everyone to use Flakes, this book is also written around NixOS and Flakes after all, but please be prepared for the problems that may be caused by the upcomming breaking changes.
|
||||
|
||||
|
||||
## Contribution
|
||||
|
||||
> _A real community, however, exists only when its members interact in a meaningful way that deepens their understanding of each other and leads to learning._
|
||||
@ -34,8 +36,6 @@ Thank you to [all the people](https://github.com/ryan4yin/nixos-and-flakes-book/
|
||||
|
||||
[MIT](https://opensource.org/licenses/MIT)
|
||||
|
||||
|
||||
|
||||
[^1]: [Flakes - NixOS Wiki](https://nixos.wiki/index.php?title=Flakes)
|
||||
[^1]: [Flakes - NixOS Wiki](https://nixos.wiki/index.php?title=Flakes)
|
||||
[^2]: [Flakes are such an obviously good thing](https://grahamc.com/blog/flakes-are-an-obviously-good-thing/)
|
||||
[^3]: [Draft: 1 year roadmap - NixOS Foundation](https://nixos-foundation.notion.site/1-year-roadmap-0dc5c2ec265a477ea65c549cd5e568a9)
|
||||
|
@ -89,7 +89,7 @@ Use [ryan4yin/nix-config/v0.0.2](https://github.com/ryan4yin/nix-config/tree/v0.
|
||||
|
||||
For more details, see [ryan4yin/nix-config/v0.0.2](https://github.com/ryan4yin/nix-config/tree/v0.0.2).
|
||||
|
||||
## `mkOverride`, `lib.mkDefault` and `lib.mkForce`
|
||||
## `lib.mkOverride`, `lib.mkDefault` and `lib.mkForce`
|
||||
|
||||
You may found some people use `lib.mkDefault` `lib.mkForce` to define values in Nix files, as their names suggest, `lib.mkDefault` and `lib.mkForce` are used to set default values or force values of options.
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
## 模块化 NixOS 配置 {#modularize-nixos-configuration}
|
||||
|
||||
到这里整个系统的骨架基本就配置完成了,当前我们 `/etc/nixos` 中的系统配置结构应该如下:
|
||||
@ -87,7 +86,7 @@ $ tree
|
||||
|
||||
详细结构与内容,请移步前面提供的 github 仓库链接,这里就不多介绍了。
|
||||
|
||||
## `mkOverride`, `lib.mkDefault` and `lib.mkForce`
|
||||
## `lib.mkOverride`, `lib.mkDefault` and `lib.mkForce`
|
||||
|
||||
你可能会发现有些人在 Nix 文件中使用 `lib.mkDefault` `lib.mkForce` 来定义值,顾名思义,`lib.mkDefault` 和 `lib.mkForce` 用于设置选项的默认值,或者强制设置选项的值。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user