mirror of
https://github.com/ryan4yin/nixos-and-flakes-book
synced 2024-11-22 20:23:10 +00:00
feat: overlays
This commit is contained in:
parent
8a9549f814
commit
63b050230c
2 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
# The Ingenious Uses of Multiple nixpkgs Instances
|
||||
|
||||
In the section [Downgrade or Upgrade Packages](../nixos-with-flakes/downgrade-or-upgrade-packages.md), we have seen how to instantiate multiple distinct nixpkgs instances using the method `import nixpkgs {...}`. There are numerous applications for this technique, some common ones include:
|
||||
In the section [Downgrade or Upgrade Packages](../nixos-with-flakes/downgrade-or-upgrade-packages.md), we have seen how to instantiate multiple distinct nixpkgs instances using the method `import nixpkgs {...}`, and use them at any submodules via `specialArgs`.
|
||||
There are numerous applications for this technique, some common ones include:
|
||||
|
||||
1. Instantiate nixpkgs instances with different commit IDs to install various versions of software packages. This approach was used in the previous section [Downgrade or Upgrade Packages](/nixos-with-flakes/downgrade-or-upgrade-packages.md).
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# 多 nixpkgs 实例的妙用
|
||||
|
||||
我们在前面 [降级与升级软件包](../nixos-with-flakes/downgrade-or-upgrade-packages.md) 一节中见过,怎么通过 `import nixpkgs {...}` 这样的方法实例化多个不同的 nixpkgs 实例。
|
||||
我们在前面 [降级与升级软件包](../nixos-with-flakes/downgrade-or-upgrade-packages.md) 一节中见过,怎么通过 `import nixpkgs {...}` 这样的方法实例化多个不同的 nixpkgs 实例,再通过 `specialArgs` 在所有子模块中使用这些 nixpkgs 实例。
|
||||
这种方法有很多的用途,常见的有:
|
||||
|
||||
1. 通过实例化 commit id 不同的 nixpkgs 实例,用于安装不同版本的软件包。前面的 [降级与升级软件包](../nixos-with-flakes/downgrade-or-upgrade-packages.md) 一节中就是这样使用的。
|
||||
|
|
Loading…
Reference in a new issue