From a9f4bb92338613788c21c9506d3e28ebe901db78 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sat, 16 Mar 2024 17:18:28 +0800 Subject: [PATCH] fix: fix typos (#123) --- docs/best-practices/remote-deployment.md | 2 +- docs/development/cross-platform-compilation.md | 4 ++-- docs/development/intro.md | 2 +- docs/faq/index.md | 4 ++-- docs/nixos-with-flakes/downgrade-or-upgrade-packages.md | 2 +- docs/nixos-with-flakes/start-using-home-manager.md | 2 +- docs/nixpkgs/overlays.md | 2 +- docs/zh/best-practices/remote-deployment.md | 2 +- docs/zh/development/cross-platform-compilation.md | 4 ++-- docs/zh/faq/index.md | 4 ++-- docs/zh/nixos-with-flakes/introduction-to-flakes.md | 2 +- docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md | 6 +++--- docs/zh/nixos-with-flakes/other-useful-tips.md | 2 +- docs/zh/nixos-with-flakes/start-using-home-manager.md | 2 +- docs/zh/nixpkgs/callpackage.md | 2 +- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/best-practices/remote-deployment.md b/docs/best-practices/remote-deployment.md index 68691e7..5bb43d6 100644 --- a/docs/best-practices/remote-deployment.md +++ b/docs/best-practices/remote-deployment.md @@ -72,7 +72,7 @@ In your system's `flake.nix`, add a new outputs named `colmena`. A simple exampl meta = { nixpkgs = import nixpkgs { system = "x86_64-linux"; }; - # This parameter functions similarly to `sepcialArgs` in `nixosConfigurations.xxx`, + # This parameter functions similarly to `specialArgs` in `nixosConfigurations.xxx`, # used for passing custom arguments to all submodules. specialArgs = { inherit nixpkgs; diff --git a/docs/development/cross-platform-compilation.md b/docs/development/cross-platform-compilation.md index 0620754..4dd4c73 100644 --- a/docs/development/cross-platform-compilation.md +++ b/docs/development/cross-platform-compilation.md @@ -211,7 +211,7 @@ So how to use this method in Flakes? The example `flake.nix` is as follows: nixpkgs.overlays = [ (self: super: { gcc = self.gcc12; }) ]; } - # other moduels ...... + # other modules ...... ]; }; }; @@ -261,7 +261,7 @@ To avoid this problem, a better way is to create a new `pkgs` instance, and only environment.systemPackages = [ pkgs-gcc12.hello ]; }) - # other moduels ...... + # other modules ...... ]; }; }; diff --git a/docs/development/intro.md b/docs/development/intro.md index f97b3b0..30bd945 100644 --- a/docs/development/intro.md +++ b/docs/development/intro.md @@ -138,7 +138,7 @@ Here is a `flake.nix` that defines a development environment with Node.js 18 ins } ``` -Create an empty folder, save the above configuration as `flake.nix`, and then execute `nix develop` (or more precisely, you can use `nix develop .#default`), the current version of nodejs will be outputed, and now you can use `node` `pnpm` `yarn` seamlessly. +Create an empty folder, save the above configuration as `flake.nix`, and then execute `nix develop` (or more precisely, you can use `nix develop .#default`), the current version of nodejs will be outputted, and now you can use `node` `pnpm` `yarn` seamlessly. ## Using zsh/fish/... instead of bash diff --git a/docs/faq/index.md b/docs/faq/index.md index 97a3f92..1532003 100644 --- a/docs/faq/index.md +++ b/docs/faq/index.md @@ -71,8 +71,8 @@ this will cause the following error: ```bash error: builder for '/nix/store/n3scj3s7v9jsb6y3v0fhndw35a9hdbs6-home-manager-path.drv' failed with exit code 25; last 1 log lines: - > error: collision between `/nix/store/kvq0gvz6jwggarrcn9a8ramsfhyh1h9d-lldb-14.0.6/lib/python3.11/site-packages/six.py' a -nd `/nix/store/370s8inz4fc9k9lqk4qzj5vyr60q166w-python3-3.11.6-env/lib/python3.11/site-packages/six.py' + > error: collision between `/nix/store/kvq0gvz6jwggarrcn9a8ramsfhyh1h9d-lldb-14.0.6/lib/python3.11/site-packages/six.py' +and `/nix/store/370s8inz4fc9k9lqk4qzj5vyr60q166w-python3-3.11.6-env/lib/python3.11/site-packages/six.py' For full logs, run 'nix log /nix/store/n3scj3s7v9jsb6y3v0fhndw35a9hdbs6-home-manager-path.drv'. ``` diff --git a/docs/nixos-with-flakes/downgrade-or-upgrade-packages.md b/docs/nixos-with-flakes/downgrade-or-upgrade-packages.md index 9028f18..a999e7e 100644 --- a/docs/nixos-with-flakes/downgrade-or-upgrade-packages.md +++ b/docs/nixos-with-flakes/downgrade-or-upgrade-packages.md @@ -41,7 +41,7 @@ Here's an example of how you can add multiple nixpkgs inputs, each using a diffe # the outer scope recursively inherit system; # To use Chrome, we need to allow the - # installation of non-free softwares. + # installation of non-free software. config.allowUnfree = true; }; pkgs-fd40cef8d = import nixpkgs-fd40cef8d { diff --git a/docs/nixos-with-flakes/start-using-home-manager.md b/docs/nixos-with-flakes/start-using-home-manager.md index f23a32d..a9a0532 100644 --- a/docs/nixos-with-flakes/start-using-home-manager.md +++ b/docs/nixos-with-flakes/start-using-home-manager.md @@ -50,7 +50,7 @@ According to the official [Home Manager Manual](https://nix-community.github.io/ # utils ripgrep # recursively searches directories for a regex pattern jq # A lightweight and flexible command-line JSON processor - yq-go # yaml processer https://github.com/mikefarah/yq + yq-go # yaml processor https://github.com/mikefarah/yq eza # A modern replacement for ‘ls’ fzf # A command-line fuzzy finder diff --git a/docs/nixpkgs/overlays.md b/docs/nixpkgs/overlays.md index 29f1ace..2b3447c 100644 --- a/docs/nixpkgs/overlays.md +++ b/docs/nixpkgs/overlays.md @@ -4,7 +4,7 @@ In the previous section, we learned about overriding derivations by `pkgs.xxx.ov However, this approach will generate a new derivation and doesn't modify the original derivation in `pkgs` instance. If the derivation you want to override is also used by other Nix packages, they will still use the unmodified derivation. -To globally modify derivations in the detault nixpkgs instance, Nix provides a feature called "overlays". +To globally modify derivations in the default nixpkgs instance, Nix provides a feature called "overlays". In traditional Nix environments, overlays can be configured globally using the `~/.config/nixpkgs/overlays.nix` or `~/.config/nixpkgs/overlays/*.nix` files. However, with Flakes feature, to ensure system reproducibility, overlays cannot rely on configurations outside of the Git repository. diff --git a/docs/zh/best-practices/remote-deployment.md b/docs/zh/best-practices/remote-deployment.md index 5888ba1..cc50bb1 100644 --- a/docs/zh/best-practices/remote-deployment.md +++ b/docs/zh/best-practices/remote-deployment.md @@ -72,7 +72,7 @@ ssh-add ~/.ssh/your-private-key meta = { nixpkgs = import nixpkgs { system = "x86_64-linux"; }; - # 这个参数的功能与 `nixosConfigurations.xxx` 中的 `sepcialArgs` 一致, + # 这个参数的功能与 `nixosConfigurations.xxx` 中的 `specialArgs` 一致, # 都是用于传递自定义参数到所有子模块。 specialArgs = { inherit nixpkgs; diff --git a/docs/zh/development/cross-platform-compilation.md b/docs/zh/development/cross-platform-compilation.md index df2177f..31b253d 100644 --- a/docs/zh/development/cross-platform-compilation.md +++ b/docs/zh/development/cross-platform-compilation.md @@ -211,7 +211,7 @@ nix-repl> pkgs.pkgsCross.riscv64.stdenv.cc nixpkgs.overlays = [ (self: super: { gcc = self.gcc12; }) ]; } - # other moduels ...... + # other modules ...... ]; }; }; @@ -261,7 +261,7 @@ nix-repl> pkgs.pkgsCross.riscv64.stdenv.cc environment.systemPackages = [ pkgs-gcc12.hello ]; }) - # other moduels ...... + # other modules ...... ]; }; }; diff --git a/docs/zh/faq/index.md b/docs/zh/faq/index.md index c30269c..2470fd8 100644 --- a/docs/zh/faq/index.md +++ b/docs/zh/faq/index.md @@ -77,8 +77,8 @@ Nix 与以 Docker 为代表的容器技术的应用场景也存在一定重合 ```bash error: builder for '/nix/store/n3scj3s7v9jsb6y3v0fhndw35a9hdbs6-home-manager-path.drv' failed with exit code 25; last 1 log lines: - > error: collision between `/nix/store/kvq0gvz6jwggarrcn9a8ramsfhyh1h9d-lldb-14.0.6/lib/python3.11/site-packages/six.py' a -nd `/nix/store/370s8inz4fc9k9lqk4qzj5vyr60q166w-python3-3.11.6-env/lib/python3.11/site-packages/six.py' + > error: collision between `/nix/store/kvq0gvz6jwggarrcn9a8ramsfhyh1h9d-lldb-14.0.6/lib/python3.11/site-packages/six.py' +and `/nix/store/370s8inz4fc9k9lqk4qzj5vyr60q166w-python3-3.11.6-env/lib/python3.11/site-packages/six.py' For full logs, run 'nix log /nix/store/n3scj3s7v9jsb6y3v0fhndw35a9hdbs6-home-manager-path.drv'. ``` diff --git a/docs/zh/nixos-with-flakes/introduction-to-flakes.md b/docs/zh/nixos-with-flakes/introduction-to-flakes.md index dfa2b92..421a620 100644 --- a/docs/zh/nixos-with-flakes/introduction-to-flakes.md +++ b/docs/zh/nixos-with-flakes/introduction-to-flakes.md @@ -45,7 +45,7 @@ Flakes 带来的好处是显而易见的,整个 NixOS 社区都很喜欢它, - [Why are flakes still experimental? - NixOS Discourse](https://discourse.nixos.org/t/why-are-flakes-still-experimental/29317): 最近的一次关于 Flakes 稳定性的讨论,可以看到大家的疑惑,以及社区对 Flakes 的态度。 - [Flakes are such an obviously good thing - Graham Christensen](https://grahamc.com/blog/flakes-are-an-obviously-good-thing/): NixOS 社区成员的文章,记录了他对 Flakes 的看法,以及对社区当初添加 Flakes 特性时的不当举措的懊悔。 - [ teaching Nix 3 CLI and Flakes #281 - nix.dev](https://github.com/NixOS/nix.dev/issues/281): 社区关于是否应该在 NixOS 官方文档中介绍 Flakes 的讨论,当前结论是官方文档不应该推广使用 unstable 功能。 -- [Draft: 1 year roadmap - NixOS Foundation](https://nixos-foundation.notion.site/1-year-roadmap-0dc5c2ec265a477ea65c549cd5e568a9): NixOS Fundation 的一份 Roadmap,其中提到了 Flakes 的计划:`Stabilize flakes and release Nix 3.0. Flakes are widely used (there are more GitHub repos being created with a flake.nix than a default.nix) but they’re still marked as experimental, which is not a good situation. The same applies to the new nix CLI.` +- [Draft: 1 year roadmap - NixOS Foundation](https://nixos-foundation.notion.site/1-year-roadmap-0dc5c2ec265a477ea65c549cd5e568a9): NixOS Foundation 的一份 Roadmap,其中提到了 Flakes 的计划:`Stabilize flakes and release Nix 3.0. Flakes are widely used (there are more GitHub repos being created with a flake.nix than a default.nix) but they’re still marked as experimental, which is not a good situation. The same applies to the new nix CLI.` 读完上述内容后,个人猜测,**Flakes 有可能(仅是可能)会在未来两年内成为稳定特性**。 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 2b36e9d..4d4d207 100644 --- a/docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md +++ b/docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md @@ -187,7 +187,7 @@ sudo nixos-rebuild switch --flake github:owner/repo#your-hostname 上面的描述可能有点绕,我们还是结合本节中使用的 `flake.nix` 示例来看看这个过程。 我们的 `flake.nix` 声明了 `inputs.nixpkgs` 这个依赖项,因此 -[nixpkgs/flake.nix] 会在我们执行 `sudo nixos-rebuild swtich` 这个命令时被求值。 +[nixpkgs/flake.nix] 会在我们执行 `sudo nixos-rebuild switch` 这个命令时被求值。 从 Nixpkgs 仓库的源码中能看到它的 flake outputs 定义中有返回 `lib` 这个属性,我们的例子中就使用了 `lib` 属性中的 `nixosSystem` 这个函数来配置我们的 NixOS 系统: ```nix{8-13} @@ -305,7 +305,7 @@ NixOS 社区比较推荐优先使用 `_module.args` 这个 options,仅在无 # 将所有 inputs 参数设为所有子模块的特殊参数, # 这样就能直接在子模块中使用 inputs 中的所有依赖项了 - specialArgs = { inheirt inputs;}; + specialArgs = { inherit inputs;}; modules = [ ./configuration.nix ]; @@ -376,7 +376,7 @@ NixOS 社区比较推荐优先使用 `_module.args` 这个 options,仅在无 outputs = inputs@{ self, nixpkgs, ... }: { nixosConfigurations.my-nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inheirt inputs;}; + specialArgs = { inherit inputs;}; modules = [ ./configuration.nix diff --git a/docs/zh/nixos-with-flakes/other-useful-tips.md b/docs/zh/nixos-with-flakes/other-useful-tips.md index 6a23adc..2cda003 100644 --- a/docs/zh/nixos-with-flakes/other-useful-tips.md +++ b/docs/zh/nixos-with-flakes/other-useful-tips.md @@ -103,7 +103,7 @@ sudo nix-collect-garbage --delete-old }; # Optimise storage - # you can alse optimise the store manually via: + # you can also optimise the store manually via: # nix-store --optimise # https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store nix.settings.auto-optimise-store = true; diff --git a/docs/zh/nixos-with-flakes/start-using-home-manager.md b/docs/zh/nixos-with-flakes/start-using-home-manager.md index b763075..061b67d 100644 --- a/docs/zh/nixos-with-flakes/start-using-home-manager.md +++ b/docs/zh/nixos-with-flakes/start-using-home-manager.md @@ -50,7 +50,7 @@ # utils ripgrep # recursively searches directories for a regex pattern jq # A lightweight and flexible command-line JSON processor - yq-go # yaml processer https://github.com/mikefarah/yq + yq-go # yaml processor https://github.com/mikefarah/yq eza # A modern replacement for ‘ls’ fzf # A command-line fuzzy finder diff --git a/docs/zh/nixpkgs/callpackage.md b/docs/zh/nixpkgs/callpackage.md index 3a7a73d..bd8f73a 100644 --- a/docs/zh/nixpkgs/callpackage.md +++ b/docs/zh/nixpkgs/callpackage.md @@ -1,6 +1,6 @@ # pkgs.callPackage -`pkgs.callPackage` 被用于参数化构建 Nix 包,为了理解它的用处,我们首先考虑下不使用 `pkgs.callPakcage` 的情况下,我们要如何定义一个 Nix 包(也就是 Derivation)。 +`pkgs.callPackage` 被用于参数化构建 Nix 包,为了理解它的用处,我们首先考虑下不使用 `pkgs.callPackage` 的情况下,我们要如何定义一个 Nix 包(也就是 Derivation)。 ## 1. 不使用 `pkgs.callPackage` 的情况