mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-01-30 22:57:59 +00:00
5242780327
Added more notes as I developed the Guix overlay for NixOS over time. It does have a nice experience, overall (albeit clunky one due to the documentation).
1.2 KiB
1.2 KiB
nixpkgs overrides and overlays
You can override values in nixpkgs as a way to customize nixpkgs. For example, if you want to use a different version from the nixpkgs channel, you can change the appropriate value.
let overlay = self: super:
{
ncmpcpp = super.ncmpcpp.override { visualizerSupport = true; };
}
For another example, you can see some examples from Neovim and Veloren (which also uses Nix flakes).
You can set overlays automatically either by setting nixpkgs.overlays
from your system configuration or ~/.config/nixpkgs/overlays/
folder for user-specific settings.
You could also set overlays for standalone Nix code similarly through the overlays
key — e.g., import <nixpkgs> ? { overlays = (self: super: { } ); };
.