From 9746bb3a524802eefa9b7b81a4e04d735521e67e Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sun, 4 Feb 2024 17:36:32 +0800 Subject: [PATCH] fix: polish --- docs/other-usage-of-flakes/module-system.md | 4 ++-- docs/zh/other-usage-of-flakes/module-system.md | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/other-usage-of-flakes/module-system.md b/docs/other-usage-of-flakes/module-system.md index 904668b..eb9f0ca 100644 --- a/docs/other-usage-of-flakes/module-system.md +++ b/docs/other-usage-of-flakes/module-system.md @@ -2,11 +2,11 @@ In our previous NixOS configurations, we set various values for `options` to configure NixOS or Home Manager. These `options` are actually defined in two locations: -> If you are using nix-darwin too, its configuration is similar, and its module system is implemented in [nix-darwin/modules](https://github.com/LnL7/nix-darwin/tree/master/modules). - - NixOS: [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/23.11/nixos/modules), where all NixOS options visible on are defined. - Home Manager: [home-manager/modules](https://github.com/nix-community/home-manager/blob/release-23.11/modules), where you can find all its options at . +> If you are using nix-darwin too, its configuration is similar, and its module system is implemented in [nix-darwin/modules](https://github.com/LnL7/nix-darwin/tree/master/modules). + The foundation of the aforementioned NixOS Modules and Home Manager Modules is a universal module system implemented in Nixpkgs, found in [lib/modules.nix][lib/modules.nix]. The official documentation for this module system is provided below (even for experienced NixOS users, understanding this can be a challenging task): - [Module System - Nixpkgs](Module System - Nixpkgs) diff --git a/docs/zh/other-usage-of-flakes/module-system.md b/docs/zh/other-usage-of-flakes/module-system.md index 9b25001..7a6b33d 100644 --- a/docs/zh/other-usage-of-flakes/module-system.md +++ b/docs/zh/other-usage-of-flakes/module-system.md @@ -2,11 +2,12 @@ 我们在前面的 NixOS 配置中通过设置各种 `options` 的值来配置 NixOS 或者 Home Manager,这些 `options` 实际都在这两个位置定义: -> 如果你还使用 nix-darwin,那么它的配置也是类似的,其模块系统的实现位于 [nix-darwin/modules](https://github.com/LnL7/nix-darwin/tree/master/modules) - - NixOS: [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/23.11/nixos/modules), 我们在 中能看到的所有 NixOS options 都是在这里定义的。 - Home Manager: [home-manager/modules](https://github.com/nix-community/home-manager/blob/release-23.11/modules): 可在 中找到其所有的 options. +> 如果你还使用 nix-darwin,那么它的配置也是类似的,其模块系统的实现位于 [nix-darwin/modules](https://github.com/LnL7/nix-darwin/tree/master/modules) + + 而上述 NixOS Modules 跟 Home Manager Modules 的基础,是 Nixpkgs 中实现的一套通用模块系统 [lib/modules.nix][lib/modules.nix],这套模块系统的官方文档如下(即使是对熟练使用 NixOS 的用户而言,要看懂这玩意儿也不是件容易的事...): - [Module System - Nixpkgs][Module System - Nixpkgs]