Overlays Overview
Purpose
Overlays allow us to extend or modify the standard nixpkgs collection. We use them to add our custom packages, apply patches, or override package versions.
Architecture / Services / Scope
Entry Points
overlays/: Directory containing individual overlay definitions.overlays/default.nix: The main entry point for the overlays. It composes additions (frompkgs/and external inputs) and modifications (overrides for upstream packages).
Operational Notes / Assumptions
Key Options/Knobs
Overlays themselves don’t typically have “knobs,” but they affect the available packages and their versions in the pkgs set.
Notable Overrides
kernelPackages.universal-pidff: Pinned to upstream commit595c65bbfrommain. Provides a newer force-feedback kernel module driver than the version bundled in the current nixpkgs release.discord: Overridden to enable OpenASAR and Vencord.hermes-agent: Local overlay that builds Hermes Agent from upstream source plus patches:hermes-desktop(pkgs/default.nix): Routes topkgs.hermes-agent.hermesDesktop, exposing the patched Hermes Desktop package as a top-levelpkgsentry for use in home-manager configs.fastembed-hermes: Overridespython312Packages.fastembedto strip Python deps already bundled in the Hermes sealed uv2nix environment (e.g.snowballstemmer). Avoids plugin/core package collision checks during Hermes plugin builds likenixai.
Common Workflows
- Adding an Overlay: Create a new
.nixfile in theoverlays/directory. - Applying an Overlay: Overlays are typically applied in the
flake.nixconfiguration for NixOS or Home-Manager.