mirror of
https://github.com/dwinkler1/nvimConfig.git
synced 2026-02-19 14:30:58 -05:00
| .. | ||
| default.nix | ||
| plugins.nix | ||
| python.nix | ||
| r.nix | ||
| README.md | ||
Overlays
This directory contains composable Nix overlays used by the Neovim wrapper configuration. Each overlay is small and focused, so you can reuse or override them downstream.
Files
-
r.nix
R-related overrides (rix overlay). Exposespkgs.rpkgsfrom rstats-on-nix and creates pre-configuredrWrapperandquartowith standard R packages. -
python.nix
Python-related overrides and package additions (e.g., extra Python packages). -
plugins.nix
Neovim plugin overrides (e.g., patching or pinning plugin derivations). -
default.nix
Aggregates and exports the overlays in a composable way. Includes the fran overlay for custom R packages.
Exports from default.nix
overlays/default.nix exposes:
rOverlay- rix overlay for R packages from rstats-on-nixfranOverlay- fran overlay for custom R packages and toolspythonOverlaypluginsOverlaydependencyOverlays(list of overlays in order)dependencyOverlay(composed overlay vialib.composeManyExtensions)default(alias ofdependencyOverlay)dependencies(alias ofdependencyOverlays)
Downstream usage examples
Use the composed default overlay
{
inputs,
...
}:
let
overlayDefs = import ./overlays/default.nix inputs;
in {
nixpkgs.overlays = [
overlayDefs.default
];
}
Use specific overlays only
{
inputs,
...
}:
let
overlayDefs = import ./overlays/default.nix inputs;
in {
nixpkgs.overlays = [
overlayDefs.rOverlay
overlayDefs.pluginsOverlay
];
}
Extend with your own overlay (composition)
{
inputs,
...
}:
let
overlayDefs = import ./overlays/default.nix inputs;
myOverlay = final: prev: {
# Example: override a package
myTool = prev.myTool.override { /* ... */ };
};
in {
nixpkgs.overlays = [
overlayDefs.default
myOverlay
];
}
Adding a new overlay
- Create a new overlay file in this directory (e.g.,
foo.nix). - Import it in
overlays/default.nixand add it todependencyOverlays. - Optionally expose it as a named export (e.g.,
fooOverlay) for downstream reuse.
Notes
- Keep overlays composable and focused.
- Avoid monolithic overlays; prefer small, purpose-specific overlays.
- When overriding plugins, keep patches minimal and document the intent.