mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-12-28 09:38:56 +01:00
fix: wrong overlay path
This commit is contained in:
parent
63b050230c
commit
977dfcb8ae
@ -52,7 +52,7 @@ Let's take a look at an example module that loads overlays. This module can be u
|
||||
})
|
||||
|
||||
# Overlay 3: Define overlays in other files
|
||||
# The content of ./overlay3/default.nix is the same as above:
|
||||
# The content of .overlays/overlay3/default.nix is the same as above:
|
||||
# `(final: prev: { xxx = prev.xxx.override { ... }; })`
|
||||
(import ./overlay3)
|
||||
];
|
||||
@ -63,7 +63,7 @@ In the above example, we define three overlays.
|
||||
|
||||
1. Overlay 1 modifies the `google-chrome` derivation by adding a command-line argument for a proxy server.
|
||||
2. Overlay 2 modifies the `steam` derivation by adding extra packages and environment variables.
|
||||
3. Overlay 3 is defined in a separate file `./overlay3/default.nix`.
|
||||
3. Overlay 3 is defined in a separate file `./overlays/overlay3/default.nix`.
|
||||
|
||||
One example of importing the above configuration as a NixOS module is as follows:
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
})
|
||||
|
||||
# overlay3 - 也可以将 overlay 定义在其他文件中
|
||||
# 这里 ./overlay3/default.nix 中的内容格式与上面的一致
|
||||
# 这里 ./overlays/overlay3/default.nix 中的内容格式与上面的一致
|
||||
# 都是 `final: prev: { xxx = prev.xxx.override { ... }; }`
|
||||
(import ./overlay3)
|
||||
];
|
||||
@ -66,7 +66,7 @@
|
||||
|
||||
1. Overlay 1 修改了 `google-chrome` 的 Derivation,增加了一个代理服务器的命令行参数。
|
||||
2. Overlay 2 修改了 `steam` 的 Derivation,增加了额外的包和环境变量。
|
||||
3. Overlay 3 被定义在一个单独的文件 `./overlay3/default.nix` 中。
|
||||
3. Overlay 3 被定义在一个单独的文件 `./overlays/overlay3/default.nix` 中。
|
||||
|
||||
一个将上述配置作为 NixOS Module 引入的 `flake.nix` 示例如下:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user