From c49e0d4892dfffb36f91d66e268b236c760b8740 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Fri, 22 Nov 2024 14:21:53 +0800 Subject: [PATCH] chore: bump nixpkgs to 24.11 (#199) --- docs/en/best-practices/remote-deployment.md | 2 +- .../development/cross-platform-compilation.md | 8 +++--- docs/en/development/intro.md | 10 +++---- docs/en/development/kernel-development.md | 2 +- docs/en/development/packaging-101.md | 8 +++--- docs/en/nix-store/add-binary-cache-servers.md | 4 +-- .../downgrade-or-upgrade-packages.md | 4 +-- .../modularize-the-configuration.md | 6 ++-- .../nixos-flake-and-module-system.md | 28 +++++++++---------- .../nixos-flake-configuration-explained.md | 26 ++++++++--------- .../nixos-with-flakes-enabled.md | 18 ++++++------ .../start-using-home-manager.md | 6 ++-- .../en/other-usage-of-flakes/module-system.md | 22 +++++++-------- docs/zh/best-practices/remote-deployment.md | 2 +- .../development/cross-platform-compilation.md | 8 +++--- docs/zh/development/intro.md | 10 +++---- docs/zh/development/kernel-development.md | 2 +- docs/zh/development/packaging-101.md | 8 +++--- docs/zh/nix-store/add-binary-cache-servers.md | 4 +-- .../downgrade-or-upgrade-packages.md | 4 +-- .../modularize-the-configuration.md | 6 ++-- .../nixos-flake-and-module-system.md | 28 +++++++++---------- .../nixos-flake-configuration-explained.md | 26 ++++++++--------- .../nixos-with-flakes-enabled.md | 18 ++++++------ .../start-using-home-manager.md | 6 ++-- .../zh/other-usage-of-flakes/module-system.md | 22 +++++++-------- flake.lock | 8 +++--- flake.nix | 4 +-- 28 files changed, 150 insertions(+), 150 deletions(-) diff --git a/docs/en/best-practices/remote-deployment.md b/docs/en/best-practices/remote-deployment.md index 9829dbb..3cf6d02 100644 --- a/docs/en/best-practices/remote-deployment.md +++ b/docs/en/best-practices/remote-deployment.md @@ -92,7 +92,7 @@ below: ```nix{11-34} { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # ... }; diff --git a/docs/en/development/cross-platform-compilation.md b/docs/en/development/cross-platform-compilation.md index b8d0c2b..1ae0067 100644 --- a/docs/en/development/cross-platform-compilation.md +++ b/docs/en/development/cross-platform-compilation.md @@ -79,7 +79,7 @@ need to add a Module in `flake.nix`, as shown below: description = "NixOS running on LicheePi 4A"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; }; outputs = inputs@{ self, nixpkgs, ... }: { @@ -136,7 +136,7 @@ cross-compilation, as shown below: description = "NixOS running on LicheePi 4A"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; }; outputs = inputs@{ self, nixpkgs, ... }: { @@ -243,7 +243,7 @@ So how to use this method in Flakes? The example `flake.nix` is as follows: description = "NixOS running on LicheePi 4A"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small"; }; outputs = { self, nixpkgs, ... }: @@ -280,7 +280,7 @@ follows: description = "NixOS running on LicheePi 4A"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small"; }; outputs = { self, nixpkgs, ... }: let diff --git a/docs/en/development/intro.md b/docs/en/development/intro.md index 725f13f..1bdc66a 100644 --- a/docs/en/development/intro.md +++ b/docs/en/development/intro.md @@ -115,7 +115,7 @@ Here is a `flake.nix` that defines a development environment with Node.js 18 ins description = "A Nix-flake-based Node.js development environment"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; }; outputs = { self , nixpkgs ,... }: let @@ -159,7 +159,7 @@ Here is an example: description = "A Nix-flake-based Node.js development environment"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; }; outputs = { self , nixpkgs ,... }: let @@ -210,7 +210,7 @@ Example: description = "A Nix-flake-based Node.js development environment"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; }; outputs = { self , nixpkgs ,... }: let @@ -283,8 +283,8 @@ the `dev-shell` command, which is the special feature of `pkgs.runCommand` compa Related source code: -- [pkgs/build-support/trivial-builders/default.nix - runCommand](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/trivial-builders/default.nix#L21-L49) -- [pkgs/build-support/setup-hooks/make-wrapper.sh](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/setup-hooks/make-wrapper.sh) +- [pkgs/build-support/trivial-builders/default.nix - runCommand](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/trivial-builders/default.nix#L21-L49) +- [pkgs/build-support/setup-hooks/make-wrapper.sh](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/setup-hooks/make-wrapper.sh) ## Enter the build environment of any Nix package diff --git a/docs/en/development/kernel-development.md b/docs/en/development/kernel-development.md index a0884b8..16717a6 100644 --- a/docs/en/development/kernel-development.md +++ b/docs/en/development/kernel-development.md @@ -9,7 +9,7 @@ An example of kernel development with `flake.nix`. description = "NixOS running on LicheePi 4A"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small"; # custom kernel's source thead-kernel = { diff --git a/docs/en/development/packaging-101.md b/docs/en/development/packaging-101.md index 7388286..14503ca 100644 --- a/docs/en/development/packaging-101.md +++ b/docs/en/development/packaging-101.md @@ -16,10 +16,10 @@ packaging. - [nix-init](https://github.com/nix-community/nix-init): Generate Nix packages from URLs with hash prefetching, dependency inference, license detection, and more - Source Code: - - [pkgs/build-support/trivial-builders/default.nix - runCommand](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/trivial-builders/default.nix#L21-L49) - - [pkgs/build-support/setup-hooks/make-wrapper.sh](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/setup-hooks/make-wrapper.sh) + - [pkgs/build-support/trivial-builders/default.nix - runCommand](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/trivial-builders/default.nix#L21-L49) + - [pkgs/build-support/setup-hooks/make-wrapper.sh](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/setup-hooks/make-wrapper.sh) - FHS related - - [pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix): + - [pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix): `pkgs.buildFHSEnvBubblewrap` - - [pkgs/build-support/build-fhsenv-chroot/default.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix): + - [pkgs/build-support/build-fhsenv-chroot/default.nix](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix): `pkgs.buildFHSEnvChroot` diff --git a/docs/en/nix-store/add-binary-cache-servers.md b/docs/en/nix-store/add-binary-cache-servers.md index b0e7a4f..b63c969 100644 --- a/docs/en/nix-store/add-binary-cache-servers.md +++ b/docs/en/nix-store/add-binary-cache-servers.md @@ -139,7 +139,7 @@ The second method is to configure `substituters` and `trusted-public-keys` using }; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # omitting several configurations... }; @@ -227,7 +227,7 @@ In other words, you can use it like this: }; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # omitting several configurations... }; diff --git a/docs/en/nixos-with-flakes/downgrade-or-upgrade-packages.md b/docs/en/nixos-with-flakes/downgrade-or-upgrade-packages.md index a34b03e..9f06c78 100644 --- a/docs/en/nixos-with-flakes/downgrade-or-upgrade-packages.md +++ b/docs/en/nixos-with-flakes/downgrade-or-upgrade-packages.md @@ -17,8 +17,8 @@ commit or branch: nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Latest stable branch of nixpkgs, used for version rollback - # The current latest version is 23.11 - nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11"; + # The current latest version is 24.11 + nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; # You can also use a specific git commit hash to lock the version nixpkgs-fd40cef8d.url = "github:nixos/nixpkgs/fd40cef8d797670e203a27a91e4b8e6decf0b90c"; diff --git a/docs/en/nixos-with-flakes/modularize-the-configuration.md b/docs/en/nixos-with-flakes/modularize-the-configuration.md index 1020f72..f126141 100644 --- a/docs/en/nixos-with-flakes/modularize-the-configuration.md +++ b/docs/en/nixos-with-flakes/modularize-the-configuration.md @@ -276,7 +276,7 @@ project: ```nix{10-38} # flake.nix { - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; outputs = {nixpkgs, ...}: { nixosConfigurations = { "my-nixos" = nixpkgs.lib.nixosSystem { @@ -325,7 +325,7 @@ strings, single-line strings, and lists. Let's test the results: ```bash # Example 1: multiline string merging › echo $(nix eval .#nixosConfigurations.my-nixos.config.programs.bash.shellInit) -trace: warning: system.stateVersion is not set, defaulting to 23.11. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersio +trace: warning: system.stateVersion is not set, defaulting to 24.11. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersio n. "echo 'insert before default' @@ -362,4 +362,4 @@ order of definition. ## 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-23.11/doc/module-system/module-system.chapter.md) +- [Module System - Nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/doc/module-system/module-system.chapter.md) diff --git a/docs/en/nixos-with-flakes/nixos-flake-and-module-system.md b/docs/en/nixos-with-flakes/nixos-flake-and-module-system.md index 757850b..962ad3e 100644 --- a/docs/en/nixos-with-flakes/nixos-flake-and-module-system.md +++ b/docs/en/nixos-with-flakes/nixos-flake-and-module-system.md @@ -54,9 +54,9 @@ automatically injected, and declaration-free parameters** provided by the module `nixpkgs.legacyPackages."${system}"`, and the value of `pkgs` can be customized through the `nixpkgs.pkgs` option. 5. `modulesPath`: A parameter available only in NixOS, which is a path pointing to - [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/nixos-23.11/nixos/modules). + [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/nixos-24.11/nixos/modules). - It is defined in - [nixpkgs/nixos/lib/eval-config-minimal.nix#L43](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/lib/eval-config-minimal.nix#L43). + [nixpkgs/nixos/lib/eval-config-minimal.nix#L43](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/lib/eval-config-minimal.nix#L43). - It is typically used to import additional NixOS modules and can be found in most NixOS auto-generated `hardware-configuration.nix` files. @@ -77,11 +77,11 @@ to understand. If readers are interested, I will include the links here: Nixpkgs Manual. - Nixpkgs Manual: [Module System - Nixpkgs] - NixOS Manual: - [nixpkgs/nixos-23.11/nixos/doc/manual/development/option-types.section.md#L237-L244] + [nixpkgs/nixos-24.11/nixos/doc/manual/development/option-types.section.md#L237-L244] 1. `_module.args`: - NixOS Manual: [Appendix A. Configuration Options](https://nixos.org/manual/nixos/stable/options#opt-_module.args) - - Source Code: [nixpkgs/nixos-23.11/lib/modules.nix - _module.args] + - Source Code: [nixpkgs/nixos-24.11/lib/modules.nix - _module.args] In short, `specialArgs` and `_module.args` both require an attribute set as their value, and they serve the same purpose, passing all parameters in the attribute set to all @@ -105,7 +105,7 @@ Suppose you want to pass a certain dependency to a submodule for use. You can us ```nix{13} { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; another-input.url = "github:username/repo-name/branch-name"; }; @@ -129,7 +129,7 @@ Or you can achieve the same effect using the `_module.args` option: ```nix{14} { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; another-input.url = "github:username/repo-name/branch-name"; }; outputs = inputs@{ self, nixpkgs, another-input, ... }: { @@ -184,7 +184,7 @@ First, add the helix input data source to `flake.nix`: ```nix{6,12,18} { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; # helix editor, use the master branch helix.url = "github:helix-editor/helix/master"; @@ -278,12 +278,12 @@ the following official/semi-official documents: [nix flake - Nix Manual]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake#flake-inputs -[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-23.11/flake.nix +[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-24.11/flake.nix [nixpkgs/nixos/lib/eval-config.nix]: - https://github.com/NixOS/nixpkgs/tree/nixos-23.11/nixos/lib/eval-config.nix + https://github.com/NixOS/nixpkgs/tree/nixos-24.11/nixos/lib/eval-config.nix [Module System - Nixpkgs]: - https://github.com/NixOS/nixpkgs/blob/23.11/doc/module-system/module-system.chapter.md -[nixpkgs/nixos-23.11/lib/modules.nix - _module.args]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/lib/modules.nix#L122-L184 -[nixpkgs/nixos-23.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 + https://github.com/NixOS/nixpkgs/blob/24.11/doc/module-system/module-system.chapter.md +[nixpkgs/nixos-24.11/lib/modules.nix - _module.args]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/lib/modules.nix#L122-L184 +[nixpkgs/nixos-24.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 diff --git a/docs/en/nixos-with-flakes/nixos-flake-configuration-explained.md b/docs/en/nixos-with-flakes/nixos-flake-configuration-explained.md index 7dcbeee..4e0ad51 100644 --- a/docs/en/nixos-with-flakes/nixos-flake-configuration-explained.md +++ b/docs/en/nixos-with-flakes/nixos-flake-configuration-explained.md @@ -12,8 +12,8 @@ dependencies of this flake. These dependencies will be passed as arguments to th ```nix{2-5,7} { inputs = { - # NixOS official package source, using the nixos-23.11 branch here - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + # NixOS official package source, using the nixos-24.11 branch here + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -45,8 +45,8 @@ results of the flake: description = "A simple NixOS flake"; inputs = { - # NixOS official package source, here using the nixos-23.11 branch - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + # NixOS official package source, here using the nixos-24.11 branch + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -141,8 +141,8 @@ definition includes the `lib` attribute, and in our example, we use the `lib` at ```nix{8-13} { inputs = { - # NixOS official package source, here using the nixos-23.11 branch - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + # NixOS official package source, here using the nixos-24.11 branch + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -173,14 +173,14 @@ source code, and study its implementation. [nix flake - Nix Manual]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake#flake-inputs -[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-23.11/flake.nix +[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-24.11/flake.nix [nixpkgs/nixos/lib/eval-config.nix]: - https://github.com/NixOS/nixpkgs/tree/nixos-23.11/nixos/lib/eval-config.nix + https://github.com/NixOS/nixpkgs/tree/nixos-24.11/nixos/lib/eval-config.nix [Module System - Nixpkgs]: - https://github.com/NixOS/nixpkgs/blob/23.11/doc/module-system/module-system.chapter.md -[nixpkgs/nixos-23.11/lib/modules.nix - _module.args]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/lib/modules.nix#L122-L184 -[nixpkgs/nixos-23.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 + https://github.com/NixOS/nixpkgs/blob/24.11/doc/module-system/module-system.chapter.md +[nixpkgs/nixos-24.11/lib/modules.nix - _module.args]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/lib/modules.nix#L122-L184 +[nixpkgs/nixos-24.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 diff --git a/docs/en/nixos-with-flakes/nixos-with-flakes-enabled.md b/docs/en/nixos-with-flakes/nixos-with-flakes-enabled.md index 63029ec..ae97bb9 100644 --- a/docs/en/nixos-with-flakes/nixos-with-flakes-enabled.md +++ b/docs/en/nixos-with-flakes/nixos-with-flakes-enabled.md @@ -79,8 +79,8 @@ Flakes. Here's an example of the content: description = "A simple NixOS flake"; inputs = { - # NixOS official package source, using the nixos-23.11 branch here - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + # NixOS official package source, using the nixos-24.11 branch here + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -146,12 +146,12 @@ bring. [nix flake - Nix Manual]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake#flake-inputs -[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-23.11/flake.nix +[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-24.11/flake.nix [nixpkgs/nixos/lib/eval-config.nix]: - https://github.com/NixOS/nixpkgs/tree/nixos-23.11/nixos/lib/eval-config.nix + https://github.com/NixOS/nixpkgs/tree/nixos-24.11/nixos/lib/eval-config.nix [Module System - Nixpkgs]: - https://github.com/NixOS/nixpkgs/blob/23.11/doc/module-system/module-system.chapter.md -[nixpkgs/nixos-23.11/lib/modules.nix - _module.args]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/lib/modules.nix#L122-L184 -[nixpkgs/nixos-23.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 + https://github.com/NixOS/nixpkgs/blob/24.11/doc/module-system/module-system.chapter.md +[nixpkgs/nixos-24.11/lib/modules.nix - _module.args]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/lib/modules.nix#L122-L184 +[nixpkgs/nixos-24.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 diff --git a/docs/en/nixos-with-flakes/start-using-home-manager.md b/docs/en/nixos-with-flakes/start-using-home-manager.md index 2ed9cac..56618c4 100644 --- a/docs/en/nixos-with-flakes/start-using-home-manager.md +++ b/docs/en/nixos-with-flakes/start-using-home-manager.md @@ -164,7 +164,7 @@ Here's an example of its contents: # You can update home Manager without changing this value. See # the home Manager release notes for a list of state version # changes in each release. - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; # Let home Manager install and manage itself. programs.home-manager.enable = true; @@ -186,10 +186,10 @@ After adjusting the parameters, the content of `/etc/nixos/flake.nix` is as foll description = "NixOS configuration"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # home-manager, used for managing user configuration home-manager = { - url = "github:nix-community/home-manager/release-23.11"; + url = "github:nix-community/home-manager/release-24.11"; # The `follows` keyword in inputs is used for inheritance. # Here, `inputs.nixpkgs` of home-manager is kept consistent with # the `inputs.nixpkgs` of the current flake, diff --git a/docs/en/other-usage-of-flakes/module-system.md b/docs/en/other-usage-of-flakes/module-system.md index e575586..81612d3 100644 --- a/docs/en/other-usage-of-flakes/module-system.md +++ b/docs/en/other-usage-of-flakes/module-system.md @@ -4,10 +4,10 @@ In our previous NixOS configurations, we set various values for `options` to con NixOS or Home Manager. These `options` are actually defined in two locations: - NixOS: - [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/23.11/nixos/modules), + [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/24.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), + [home-manager/modules](https://github.com/nix-community/home-manager/blob/release-24.11/modules), where you can find all its options at . @@ -217,7 +217,7 @@ Let's start with a simple example: # ./flake.nix { description = "NixOS Flake for Test"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; outputs = {nixpkgs, ...}: { nixosConfigurations = { @@ -331,7 +331,7 @@ The first thought might be to directly use `imports` in `config = { ... };`, lik # ./flake.nix { description = "NixOS Flake for Test"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; outputs = {nixpkgs, ...}: { nixosConfigurations = { @@ -396,7 +396,7 @@ Let's look at an example directly: # ./flake.nix { description = "NixOS Flake for Test"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; outputs = {nixpkgs, ...}: { nixosConfigurations = { @@ -446,14 +446,14 @@ section - [Module System - Nixpkgs] - [Writing NixOS Modules - Nixpkgs] -[lib/modules.nix]: https://github.com/NixOS/nixpkgs/blob/23.11/lib/modules.nix#L995 +[lib/modules.nix]: https://github.com/NixOS/nixpkgs/blob/24.11/lib/modules.nix#L995 [Module System - Nixpkgs]: - https://github.com/NixOS/nixpkgs/blob/23.11/doc/module-system/module-system.chapter.md + https://github.com/NixOS/nixpkgs/blob/24.11/doc/module-system/module-system.chapter.md [Writing NixOS Modules - Nixpkgs]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/writing-modules.chapter.md + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/writing-modules.chapter.md [Option Definitions - NixOS]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-def.section.md + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-def.section.md [Option Declarations - NixOS]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-declarations.section.md + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-declarations.section.md [Options Types - NixOS]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-types.section.md + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-types.section.md diff --git a/docs/zh/best-practices/remote-deployment.md b/docs/zh/best-practices/remote-deployment.md index f23b697..4b63f97 100644 --- a/docs/zh/best-practices/remote-deployment.md +++ b/docs/zh/best-practices/remote-deployment.md @@ -73,7 +73,7 @@ ssh-add ~/.ssh/your-private-key ```nix{11-34} { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # ... }; diff --git a/docs/zh/development/cross-platform-compilation.md b/docs/zh/development/cross-platform-compilation.md index 585b2a5..5c19c8f 100644 --- a/docs/zh/development/cross-platform-compilation.md +++ b/docs/zh/development/cross-platform-compilation.md @@ -71,7 +71,7 @@ Module,示例如下: description = "NixOS running on LicheePi 4A"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; }; outputs = inputs@{ self, nixpkgs, ... }: { @@ -125,7 +125,7 @@ Module,示例如下: description = "NixOS running on LicheePi 4A"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; }; outputs = inputs@{ self, nixpkgs, ... }: { @@ -217,7 +217,7 @@ nix-repl> pkgs.pkgsCross.riscv64.stdenv.cc description = "NixOS running on LicheePi 4A"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small"; }; outputs = { self, nixpkgs, ... }: @@ -252,7 +252,7 @@ nix-repl> pkgs.pkgsCross.riscv64.stdenv.cc description = "NixOS running on LicheePi 4A"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small"; }; outputs = { self, nixpkgs, ... }: let diff --git a/docs/zh/development/intro.md b/docs/zh/development/intro.md index 46b0dd0..e4f4aa9 100644 --- a/docs/zh/development/intro.md +++ b/docs/zh/development/intro.md @@ -118,7 +118,7 @@ stdenv.mkDerivation ({ description = "A Nix-flake-based Node.js development environment"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; }; outputs = { self , nixpkgs ,... }: let @@ -162,7 +162,7 @@ stdenv.mkDerivation ({ description = "A Nix-flake-based Node.js development environment"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; }; outputs = { self , nixpkgs ,... }: let @@ -212,7 +212,7 @@ wrapper,比如 `pkgs.runCommand`. description = "A Nix-flake-based Node.js development environment"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; }; outputs = { self , nixpkgs ,... }: let @@ -280,8 +280,8 @@ session,可以在其中正常使用 `node` `pnpm` 命令. 相关源代码: -- [pkgs/build-support/trivial-builders/default.nix - runCommand](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/trivial-builders/default.nix#L21-L49) -- [pkgs/build-support/setup-hooks/make-wrapper.sh](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/setup-hooks/make-wrapper.sh) +- [pkgs/build-support/trivial-builders/default.nix - runCommand](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/trivial-builders/default.nix#L21-L49) +- [pkgs/build-support/setup-hooks/make-wrapper.sh](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/setup-hooks/make-wrapper.sh) ## 进入任何 Nix 包的构建环境 diff --git a/docs/zh/development/kernel-development.md b/docs/zh/development/kernel-development.md index f03de09..bfdfeb1 100644 --- a/docs/zh/development/kernel-development.md +++ b/docs/zh/development/kernel-development.md @@ -9,7 +9,7 @@ description = "NixOS running on LicheePi 4A"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small"; # custom kernel's source thead-kernel = { diff --git a/docs/zh/development/packaging-101.md b/docs/zh/development/packaging-101.md index 904eae6..41c9142 100644 --- a/docs/zh/development/packaging-101.md +++ b/docs/zh/development/packaging-101.md @@ -15,12 +15,12 @@ WIP 未完成,目前请移步如下参考文档学习 Nix 打包。 - [nix-init](https://github.com/nix-community/nix-init): Generate Nix packages from URLs with hash prefetching, dependency inference, license detection, and more - Source Code: - - [pkgs/build-support/trivial-builders/default.nix - runCommand](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/trivial-builders/default.nix#L21-L49) - - [pkgs/build-support/setup-hooks/make-wrapper.sh](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/setup-hooks/make-wrapper.sh) + - [pkgs/build-support/trivial-builders/default.nix - runCommand](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/trivial-builders/default.nix#L21-L49) + - [pkgs/build-support/setup-hooks/make-wrapper.sh](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/setup-hooks/make-wrapper.sh) - FHS related - - [pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix): + - [pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix): `pkgs.buildFHSEnvBubblewrap` - - [pkgs/build-support/build-fhsenv-chroot/default.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix): + - [pkgs/build-support/build-fhsenv-chroot/default.nix](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix): `pkgs.buildFHSEnvChroot` --- diff --git a/docs/zh/nix-store/add-binary-cache-servers.md b/docs/zh/nix-store/add-binary-cache-servers.md index 9cf3e06..8333ce1 100644 --- a/docs/zh/nix-store/add-binary-cache-servers.md +++ b/docs/zh/nix-store/add-binary-cache-servers.md @@ -127,7 +127,7 @@ Nix 中通过如下几个 options 来配置缓存服务器: }; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # 省略若干配置... }; @@ -209,7 +209,7 @@ Nix 提供了 }; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # 省略若干配置... }; diff --git a/docs/zh/nixos-with-flakes/downgrade-or-upgrade-packages.md b/docs/zh/nixos-with-flakes/downgrade-or-upgrade-packages.md index 4befadc..2ad6486 100644 --- a/docs/zh/nixos-with-flakes/downgrade-or-upgrade-packages.md +++ b/docs/zh/nixos-with-flakes/downgrade-or-upgrade-packages.md @@ -20,8 +20,8 @@ commit. nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # 最新 stable 分支的 nixpkgs,用于回退个别软件包的版本 - # 当前最新版本为 23.11 - nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11"; + # 当前最新版本为 24.11 + nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; # 另外也可以使用 git commit hash 来锁定版本,这是最彻底的锁定方式 nixpkgs-fd40cef8d.url = "github:nixos/nixpkgs/fd40cef8d797670e203a27a91e4b8e6decf0b90c"; diff --git a/docs/zh/nixos-with-flakes/modularize-the-configuration.md b/docs/zh/nixos-with-flakes/modularize-the-configuration.md index 1bd225e..5cbce47 100644 --- a/docs/zh/nixos-with-flakes/modularize-the-configuration.md +++ b/docs/zh/nixos-with-flakes/modularize-the-configuration.md @@ -224,7 +224,7 @@ Nix Flakes 对目录结构没有任何要求,你可以参考上面的例子, ```nix{10-38} # flake.nix { - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; outputs = {nixpkgs, ...}: { nixosConfigurations = { "my-nixos" = nixpkgs.lib.nixosSystem { @@ -273,7 +273,7 @@ Nix Flakes 对目录结构没有任何要求,你可以参考上面的例子, ```bash # 示例一:多行字符串合并 › echo $(nix eval .#nixosConfigurations.my-nixos.config.programs.bash.shellInit) -trace: warning: system.stateVersion is not set, defaulting to 23.11. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersio +trace: warning: system.stateVersion is not set, defaulting to 24.11. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersio n. "echo 'insert before default' @@ -308,5 +308,5 @@ echo 'insert after default';" ## 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-23.11/doc/module-system/module-system.chapter.md) +- [Module System - Nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/doc/module-system/module-system.chapter.md) - [Misterio77/nix-starter-configs](https://github.com/Misterio77/nix-starter-configs) diff --git a/docs/zh/nixos-with-flakes/nixos-flake-and-module-system.md b/docs/zh/nixos-with-flakes/nixos-flake-and-module-system.md index e46c7a6..b617be7 100644 --- a/docs/zh/nixos-with-flakes/nixos-flake-and-module-system.md +++ b/docs/zh/nixos-with-flakes/nixos-flake-and-module-system.md @@ -48,9 +48,9 @@ Nix 代码的模块化系统。 - 入门阶段可以认为它的默认值为 `nixpkgs.legacyPackages."${system}"`,可通过 `nixpkgs.pkgs` 这个 option 来自定义 `pkgs` 的值 5. `modulesPath`: 一个只在 NixOS 中可用的参数,是一个 Path,指向 - [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/nixos-23.11/nixos/modules) + [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/nixos-24.11/nixos/modules) - 它在 - [nixpkgs/nixos/lib/eval-config-minimal.nix#L43](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/lib/eval-config-minimal.nix#L43) + [nixpkgs/nixos/lib/eval-config-minimal.nix#L43](https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/lib/eval-config-minimal.nix#L43) 中被定义 - 通常被用于导入一些额外的 NixOS 模块,NixOS 自动生成的 `hardware-configuration.nix` 中 基本都能看到它 @@ -69,11 +69,11 @@ Nixpkgs 的模块系统提供了两种方式来传递非默认参数: 1. `specialArgs`: NixOS Manual 跟 Nixpkgs Manual 中分别有与它有关的只言片语 - Nixpkgs Manual: [Module System - Nixpkgs] - NixOS Manual: - [nixpkgs/nixos-23.11/nixos/doc/manual/development/option-types.section.md#L237-L244] + [nixpkgs/nixos-24.11/nixos/doc/manual/development/option-types.section.md#L237-L244] 1. `_module.args`: - NixOS Manual: [Appendix A. Configuration Options](https://nixos.org/manual/nixos/stable/options#opt-_module.args) - - Source Code: [nixpkgs/nixos-23.11/lib/modules.nix - _module.args] + - Source Code: [nixpkgs/nixos-24.11/lib/modules.nix - _module.args] 总之,`specialArgs` 与 `_module.args` 需要的值都是一个 attribute set,它们的功能也相同,都 是将其 attribute set 中的所有参数传递到所有子模块中。这两者的区别在于: @@ -96,7 +96,7 @@ NixOS 社区比较推荐优先使用 `_module.args` 这个 options,仅在无 ```nix{13} { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; another-input.url = "github:username/repo-name/branch-name"; }; @@ -120,7 +120,7 @@ NixOS 社区比较推荐优先使用 `_module.args` 这个 options,仅在无 ```nix{15} { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; another-input.url = "github:username/repo-name/branch-name"; }; @@ -173,7 +173,7 @@ helix 的 master 分支。 ```nix{6,12,18} { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; # helix editor, use the master branch helix.url = "github:helix-editor/helix/master"; @@ -259,12 +259,12 @@ nix run github:helix-editor/helix/master [nix flake - Nix Manual]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake#flake-inputs -[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-23.11/flake.nix +[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-24.11/flake.nix [nixpkgs/nixos/lib/eval-config.nix]: - https://github.com/NixOS/nixpkgs/tree/nixos-23.11/nixos/lib/eval-config.nix + https://github.com/NixOS/nixpkgs/tree/nixos-24.11/nixos/lib/eval-config.nix [Module System - Nixpkgs]: - https://github.com/NixOS/nixpkgs/blob/23.11/doc/module-system/module-system.chapter.md -[nixpkgs/nixos-23.11/lib/modules.nix - _module.args]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/lib/modules.nix#L122-L184 -[nixpkgs/nixos-23.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 + https://github.com/NixOS/nixpkgs/blob/24.11/doc/module-system/module-system.chapter.md +[nixpkgs/nixos-24.11/lib/modules.nix - _module.args]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/lib/modules.nix#L122-L184 +[nixpkgs/nixos-24.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 diff --git a/docs/zh/nixos-with-flakes/nixos-flake-configuration-explained.md b/docs/zh/nixos-with-flakes/nixos-flake-configuration-explained.md index 9c2b4fa..23ef4a4 100644 --- a/docs/zh/nixos-with-flakes/nixos-flake-configuration-explained.md +++ b/docs/zh/nixos-with-flakes/nixos-flake-configuration-explained.md @@ -11,8 +11,8 @@ ```nix{2-5,7} { inputs = { - # NixOS 官方软件源,这里使用 nixos-23.11 分支 - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + # NixOS 官方软件源,这里使用 nixos-24.11 分支 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -42,8 +42,8 @@ attribute set,这个返回的 attribute set 即为该 flake 的构建结果: description = "A simple NixOS flake"; inputs = { - # NixOS 官方软件源,这里使用 nixos-23.11 分支 - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + # NixOS 官方软件源,这里使用 nixos-24.11 分支 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -125,8 +125,8 @@ outputs 定义中有返回 `lib` 这个属性,我们的例子中就使用了 ` ```nix{8-13} { inputs = { - # NixOS 官方软件源,这里使用 nixos-23.11 分支 - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + # NixOS 官方软件源,这里使用 nixos-24.11 分支 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -158,14 +158,14 @@ outputs 定义中有返回 `lib` 这个属性,我们的例子中就使用了 ` [nix flake - Nix Manual]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake#flake-inputs -[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-23.11/flake.nix +[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-24.11/flake.nix [nixpkgs/nixos/lib/eval-config.nix]: - https://github.com/NixOS/nixpkgs/tree/nixos-23.11/nixos/lib/eval-config.nix + https://github.com/NixOS/nixpkgs/tree/nixos-24.11/nixos/lib/eval-config.nix [Module System - Nixpkgs]: - https://github.com/NixOS/nixpkgs/blob/23.11/doc/module-system/module-system.chapter.md -[nixpkgs/nixos-23.11/lib/modules.nix - _module.args]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/lib/modules.nix#L122-L184 -[nixpkgs/nixos-23.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 + https://github.com/NixOS/nixpkgs/blob/24.11/doc/module-system/module-system.chapter.md +[nixpkgs/nixos-24.11/lib/modules.nix - _module.args]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/lib/modules.nix#L122-L184 +[nixpkgs/nixos-24.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 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 374d87b..2801bda 100644 --- a/docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md +++ b/docs/zh/nixos-with-flakes/nixos-with-flakes-enabled.md @@ -69,8 +69,8 @@ cat flake.nix description = "A simple NixOS flake"; inputs = { - # NixOS 官方软件源,这里使用 nixos-23.11 分支 - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + # NixOS 官方软件源,这里使用 nixos-24.11 分支 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -124,12 +124,12 @@ cat flake.nix [nix flake - Nix Manual]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake#flake-inputs -[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-23.11/flake.nix +[nixpkgs/flake.nix]: https://github.com/NixOS/nixpkgs/tree/nixos-24.11/flake.nix [nixpkgs/nixos/lib/eval-config.nix]: - https://github.com/NixOS/nixpkgs/tree/nixos-23.11/nixos/lib/eval-config.nix + https://github.com/NixOS/nixpkgs/tree/nixos-24.11/nixos/lib/eval-config.nix [Module System - Nixpkgs]: - https://github.com/NixOS/nixpkgs/blob/23.11/doc/module-system/module-system.chapter.md -[nixpkgs/nixos-23.11/lib/modules.nix - _module.args]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/lib/modules.nix#L122-L184 -[nixpkgs/nixos-23.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 + https://github.com/NixOS/nixpkgs/blob/24.11/doc/module-system/module-system.chapter.md +[nixpkgs/nixos-24.11/lib/modules.nix - _module.args]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/lib/modules.nix#L122-L184 +[nixpkgs/nixos-24.11/nixos/doc/manual/development/option-types.section.md#L237-L244]: + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-types.section.md?plain=1#L237-L244 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 e5f8215..873934e 100644 --- a/docs/zh/nixos-with-flakes/start-using-home-manager.md +++ b/docs/zh/nixos-with-flakes/start-using-home-manager.md @@ -163,7 +163,7 @@ manager 作为 NixOS 模块安装,首先需要创建 `/etc/nixos/home.nix`, # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; # Let Home Manager install and manage itself. programs.home-manager.enable = true; @@ -184,10 +184,10 @@ nix flake new example -t github:nix-community/home-manager#nixos description = "NixOS configuration"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; # home-manager, used for managing user configuration home-manager = { - url = "github:nix-community/home-manager/release-23.11"; + url = "github:nix-community/home-manager/release-24.11"; # The `follows` keyword in inputs is used for inheritance. # Here, `inputs.nixpkgs` of home-manager is kept consistent with # the `inputs.nixpkgs` of the current flake, diff --git a/docs/zh/other-usage-of-flakes/module-system.md b/docs/zh/other-usage-of-flakes/module-system.md index 289a693..b3465de 100644 --- a/docs/zh/other-usage-of-flakes/module-system.md +++ b/docs/zh/other-usage-of-flakes/module-system.md @@ -4,10 +4,10 @@ `options` 实际都在这两个位置定义: - NixOS: - [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/23.11/nixos/modules), 我们 + [nixpkgs/nixos/modules](https://github.com/NixOS/nixpkgs/tree/24.11/nixos/modules), 我们 在 中能看到的所有 NixOS options 都是在这里定义的。 - Home Manager: - [home-manager/modules](https://github.com/nix-community/home-manager/blob/release-23.11/modules): + [home-manager/modules](https://github.com/nix-community/home-manager/blob/release-24.11/modules): 可在 中找到其所有的options. > 如果你还使用 nix-darwin,那么它的配置也是类似的,其模块系统的实现位于 @@ -196,7 +196,7 @@ foo 的自定义配置了,示例: # ./flake.nix { description = "NixOS Flake for Test"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; outputs = {nixpkgs, ...}: { nixosConfigurations = { @@ -293,7 +293,7 @@ options 的声明与类型检查。 # ./flake.nix { description = "NixOS Flake for Test"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; outputs = {nixpkgs, ...}: { nixosConfigurations = { @@ -355,7 +355,7 @@ options 的声明与类型检查。 # ./flake.nix { description = "NixOS Flake for Test"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; outputs = {nixpkgs, ...}: { nixosConfigurations = { @@ -404,14 +404,14 @@ options 的声明与类型检查。 - [Module System - Nixpkgs][Module System - Nixpkgs] - [Writing NixOS Modules - Nixpkgs][Writing NixOS Modules - Nixpkgs] -[lib/modules.nix]: https://github.com/NixOS/nixpkgs/blob/23.11/lib/modules.nix#L995 +[lib/modules.nix]: https://github.com/NixOS/nixpkgs/blob/24.11/lib/modules.nix#L995 [Module System - Nixpkgs]: - https://github.com/NixOS/nixpkgs/blob/23.11/doc/module-system/module-system.chapter.md + https://github.com/NixOS/nixpkgs/blob/24.11/doc/module-system/module-system.chapter.md [Writing NixOS Modules - Nixpkgs]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/writing-modules.chapter.md + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/writing-modules.chapter.md [Option Definitions - NixOS]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-def.section.md + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-def.section.md [Option Declarations - NixOS]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-declarations.section.md + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-declarations.section.md [Options Types - NixOS]: - https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/doc/manual/development/option-types.section.md + https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/doc/manual/development/option-types.section.md diff --git a/flake.lock b/flake.lock index a89d9c2..aec8aea 100644 --- a/flake.lock +++ b/flake.lock @@ -75,16 +75,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1701802827, - "narHash": "sha256-wTn0lpV75Uv6tU6haEypNsmnJJPb0hpaMIy/4uf5AiQ=", + "lastModified": 1731755305, + "narHash": "sha256-v5P3dk5JdiT+4x69ZaB18B8+Rcu3TIOrcdG4uEX7WZ8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a804fc878d7ba1558b960b4c64b0903da426ac41", + "rev": "057f63b6dc1a2c67301286152eb5af20747a9cb4", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index ed5a328..de90b91 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "A Nix-flake-based Node.js development environment"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; flake-utils.url = "github:numtide/flake-utils"; pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; }; @@ -17,7 +17,7 @@ overlays = [ (self: super: rec { nodejs = super.nodejs_20; - pnpm = super.nodePackages.pnpm; + pnpm = super.pnpm.override {inherit nodejs;}; yarn = super.yarn.override {inherit nodejs;}; prettier = super.nodePackages.prettier; })