Nixpkgs's Advanced Usage
Overlays are the techniques occasionally used when using Nix to customize the build method of Nix packages.
We know that many programs have a large number of build parameters that need to be configured, and different users may want to use different build parameters. This is where
Overlays come in handy. Let me give you a few examples I have encountered:
fcitx5-rime.nix: By default,
rime-dataas the value of
rimeDataPkgs, but this parameter can be customized by
vscode/with-extensions.nix: This package for VS Code can also be customized by overriding the value of
vscodeExtensions, thus we can install some custom plugins into VS Code.
nix-vscode-extensions: This is a vscode plugin manager implemented by overriding
firefox/common.nix: Firefox has many customizable parameters too.
Overlays can be used to customize the build parameters of Nix packages.