mirror of
https://github.com/ryan4yin/nixos-and-flakes-book
synced 2024-11-23 12:43:08 +00:00
feat: add some links into module-system and advanced-topics
This commit is contained in:
parent
f3caeb81ce
commit
6e2a910f86
4 changed files with 19 additions and 5 deletions
|
@ -1,6 +1,5 @@
|
||||||
## Advanced Topics
|
## Advanced Topics
|
||||||
|
|
||||||
|
|
||||||
After becoming familiar with the NixOS, you can further explore Nix's three manuals and other docs to discover more ways to use it:
|
After becoming familiar with the NixOS, you can further explore Nix's three manuals and other docs to discover more ways to use it:
|
||||||
|
|
||||||
- [Nix Reference Manual](https://nixos.org/manual/nix/stable/package-management/profiles.html): A guide to the Nix package manager, which mainly covers the design of the package manager and instructions for using it from the command line.
|
- [Nix Reference Manual](https://nixos.org/manual/nix/stable/package-management/profiles.html): A guide to the Nix package manager, which mainly covers the design of the package manager and instructions for using it from the command line.
|
||||||
|
@ -17,11 +16,13 @@ After becoming familiar with Flakes, you may want to try some advanced technique
|
||||||
|
|
||||||
And many other useful community projects to explore, here are some of them:
|
And many other useful community projects to explore, here are some of them:
|
||||||
|
|
||||||
|
- [nixpak](https://github.com/nixpak/nixpak)
|
||||||
|
- [nix-output-monitor](https://github.com/maralorn/nix-output-monitor)
|
||||||
- [agenix](https://github.com/ryantm/agenix): secrets management
|
- [agenix](https://github.com/ryantm/agenix): secrets management
|
||||||
- [colmena](https://github.com/zhaofengli/colmena): NixOS deployment tools
|
- [colmena](https://github.com/zhaofengli/colmena): NixOS deployment tools
|
||||||
- [nixos-generator](https://github.com/nix-community/nixos-generators): generate iso/qcow2/... from nixos configuration
|
- [nixos-generator](https://github.com/nix-community/nixos-generators): generate iso/qcow2/... from nixos configuration
|
||||||
- [lanzaboote](https://github.com/nix-community/lanzaboote): enable secure boot for NixOS
|
- [lanzaboote](https://github.com/nix-community/lanzaboote): enable secure boot for NixOS
|
||||||
- [impermanence](https://github.com/nix-community/impermanence): used to make NixOS stateless, to imporve the reproduciability of NixOS system.
|
- [impermanence](https://github.com/nix-community/impermanence): used to make NixOS stateless, to imporve the reproduciability of NixOS system.
|
||||||
|
- ...
|
||||||
|
|
||||||
[digga]: https://github.com/divnix/digga
|
[digga]: https://github.com/divnix/digga
|
|
@ -245,3 +245,8 @@ nix-repl> outputs.nixosConfigurations.nixos-test.config.environment.systemPackag
|
||||||
So we can see that the order of `systemPackages` is `git -> curl -> default packages -> vim`, which is the same as the order we defined in `flake.nix`.
|
So we can see that the order of `systemPackages` is `git -> curl -> default packages -> vim`, which is the same as the order we defined in `flake.nix`.
|
||||||
|
|
||||||
> Though it's useless to adjust the order of `systemPackages`, it may be helpful at some other places...
|
> Though it's useless to adjust the order of `systemPackages`, it may be helpful at some other places...
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- [Nix modules: Improving Nix's discoverability and usability ](https://cfp.nixcon.org/nixcon2020/talk/K89WJY/)
|
||||||
|
- [Module System - Nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/doc/module-system/module-system.chapter.md)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
## 进阶玩法 {#advanced-topics}
|
## 进阶玩法 {#advanced-topics}
|
||||||
|
|
||||||
逐渐熟悉 Nix 这一套工具链后,可以进一步读一读 Nix 的三本手册,挖掘更多的玩法:
|
逐渐熟悉 Nix 这一套工具链后,可以进一步读一读 Nix 的三本手册,挖掘更多的玩法:
|
||||||
|
@ -17,10 +16,13 @@
|
||||||
|
|
||||||
以及其他许多实用的社区项目可探索,我比较关注的有这几个:
|
以及其他许多实用的社区项目可探索,我比较关注的有这几个:
|
||||||
|
|
||||||
|
- [nixpak](https://github.com/nixpak/nixpak)
|
||||||
|
- [nix-output-monitor](https://github.com/maralorn/nix-output-monitor)
|
||||||
- [agenix](https://github.com/ryantm/agenix): secrets 管理
|
- [agenix](https://github.com/ryantm/agenix): secrets 管理
|
||||||
- [nixos-generator](https://github.com/nix-community/nixos-generators): 镜像生成工具,从 nixos 配置生成 iso/qcow2 等格式的镜像
|
- [nixos-generator](https://github.com/nix-community/nixos-generators): 镜像生成工具,从 nixos 配置生成 iso/qcow2 等格式的镜像
|
||||||
- [lanzaboote](https://github.com/nix-community/lanzaboote): 启用 secure boot
|
- [lanzaboote](https://github.com/nix-community/lanzaboote): 启用 secure boot
|
||||||
- [impermanence](https://github.com/nix-community/impermanence): 用于配置无状态系统。可用它持久化你指定的文件或文件夹,同时再将 /home 目录挂载为 tmpfs 或者每次启动时用工具擦除一遍。这样所有不受 impermanence 管理的数据都将成为临时数据,如果它们导致了任何问题,重启下系统这些数据就全部还原到初始状态了!
|
- [impermanence](https://github.com/nix-community/impermanence): 用于配置无状态系统。可用它持久化你指定的文件或文件夹,同时再将 /home 目录挂载为 tmpfs 或者每次启动时用工具擦除一遍。这样所有不受 impermanence 管理的数据都将成为临时数据,如果它们导致了任何问题,重启下系统这些数据就全部还原到初始状态了!
|
||||||
- [colmena](https://github.com/zhaofengli/colmena): NixOS 主机部署工具
|
- [colmena](https://github.com/zhaofengli/colmena): NixOS 主机部署工具
|
||||||
|
- ...
|
||||||
|
|
||||||
[digga]: https://github.com/divnix/digga
|
[digga]: https://github.com/divnix/digga
|
|
@ -245,3 +245,9 @@ nix-repl> outputs.nixosConfigurations.nixos-test.config.environment.systemPackag
|
||||||
能看到 `systemPackages` 的顺序是 `git -> curl -> default packages -> vim`,跟我们预期的一致。`lib.mkBefore [pkgs.git]` 确实是将 `git` 插入到了列表头,而 `lib.mkAfter [pkgs.vim]` 则是将 `vim` 插入到了列表尾。
|
能看到 `systemPackages` 的顺序是 `git -> curl -> default packages -> vim`,跟我们预期的一致。`lib.mkBefore [pkgs.git]` 确实是将 `git` 插入到了列表头,而 `lib.mkAfter [pkgs.vim]` 则是将 `vim` 插入到了列表尾。
|
||||||
|
|
||||||
> 虽然单纯调整 `systemPackages` 的顺序没什么用,但是在其他地方可能会有用...
|
> 虽然单纯调整 `systemPackages` 的顺序没什么用,但是在其他地方可能会有用...
|
||||||
|
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- [Nix modules: Improving Nix's discoverability and usability ](https://cfp.nixcon.org/nixcon2020/talk/K89WJY/)
|
||||||
|
- [Module System - Nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/doc/module-system/module-system.chapter.md)
|
||||||
|
|
Loading…
Reference in a new issue