Files
nixos-config/overlays/default.nix
T

116 lines
4.4 KiB
Nix
Raw Normal View History

2024-10-20 00:30:58 +02:00
{inputs, ...}: {
# This one brings our custom packages from the 'pkgs' directory
# additions = final: prev:
# (import ../pkgs {pkgs = final;})
# // {rose-pine-hyprcursor = inputs.rose-pine-hyprcursor.packages.${prev.system}.default;};
2025-09-29 18:58:19 +02:00
2024-10-20 00:30:58 +02:00
# This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
2026-08-02 09:45:21 +02:00
modifications = _final: _prev: {
# n8n = import ./mods/n8n.nix {inherit prev;};
2025-03-18 11:56:09 +01:00
# brave = prev.brave.override {
# commandLineArgs = "--password-store=gnome-libsecret";
2026-04-06 18:44:07 +02:00
# };
2025-03-28 10:00:43 +01:00
# hyprpanel = inputs.hyprpanel.packages.${prev.system}.default.overrideAttrs (prev: {
# version = "latest"; # or whatever version you want
# src = final.fetchFromGitHub {
# owner = "Jas-SinghFSU";
# repo = "HyprPanel";
# rev = "master"; # or a specific commit hash
# hash = "sha256-l623fIVhVCU/ylbBmohAtQNbK0YrWlEny0sC/vBJ+dU=";
# };
# });
};
2024-10-20 00:30:58 +02:00
2026-07-10 15:19:44 +02:00
# temp-packages = final: _prev: {
# temp = import inputs.nixpkgs-9e9486b {
# system = final.stdenv.hostPlatform.system;
# config.allowUnfree = true;
# };
# };
2025-05-06 14:41:27 +02:00
2024-10-20 00:30:58 +02:00
stable-packages = final: _prev: {
stable = import inputs.nixpkgs-stable {
2026-03-28 10:17:29 +01:00
system = final.stdenv.hostPlatform.system;
2024-10-20 00:30:58 +02:00
config.allowUnfree = true;
};
};
2024-11-07 10:50:13 +01:00
2026-07-10 15:19:44 +02:00
# pinned-packages = final: _prev: {
# pinned = import inputs.nixpkgs-9472de4 {
# system = final.stdenv.hostPlatform.system;
# config.allowUnfree = true;
# };
# };
2024-11-07 10:50:13 +01:00
2026-07-10 15:19:44 +02:00
# locked-packages = final: _prev: {
# locked = import inputs.nixpkgs-locked {
# system = final.stdenv.hostPlatform.system;
# config.allowUnfree = true;
# };
# };
2025-03-28 10:00:43 +01:00
2024-11-07 10:50:13 +01:00
master-packages = final: _prev: {
master = import inputs.nixpkgs-master {
2026-03-28 10:17:29 +01:00
system = final.stdenv.hostPlatform.system;
2024-11-07 10:50:13 +01:00
config.allowUnfree = true;
};
};
2026-03-07 11:44:04 +01:00
2026-04-06 18:44:07 +02:00
# Factory: not a proper overlay itself — takes system to avoid the infinite
# recursion that occurs when accessing final/prev.system while the fixed-point
# is still being computed. Exposed via outputs.lib, not outputs.overlays.
2026-07-25 14:54:22 +02:00
#
2026-08-02 09:45:21 +02:00
# Use llm-agents' shared-nixpkgs overlay so packages with optional GPU support
# (notably qmd) are built against this system's pkgs/config. Using the flake's
# pre-built `packages.${system}` set pins them to llm-agents' own nixpkgs,
# where allowUnfree is false; qmd.override { cudaSupport = true; } then fails
# on CUDA EULA packages during the m3-ares NVIDIA specialisation build.
#
# Keep the exposed top-level package names aligned with llm-agents' filtered
# flake packages, but take the package values from the shared package set.
# Filters out internal helpers (marked `passthru.hideFromDocs = true`
2026-07-25 14:54:22 +02:00
# upstream) that would otherwise clobber nixpkgs attributes. Most critically
# this excludes `buildNpmPackage` — llm-agents' buildNpmPackage is a guarded
# re-export whose `__functor`/`override` interaction with makeOverridable
# breaks any package (e.g. nixpkgs' webcord) that calls
# `buildNpmPackage.override { nodejs = ...; }`. See numtide/llm-agents.nix
# commit 40490259 and the wrapper at packages/buildNpmPackage/package.nix.
2026-08-02 09:45:21 +02:00
mkLlmAgentsOverlay = system: final: prev: let
sharedPackages = (inputs.llm-agents.overlays.shared-nixpkgs final prev).llm-agents or {};
exposedPackageNames =
builtins.filter
(name: inputs.nixpkgs.lib.hasAttrByPath [name] sharedPackages)
(builtins.attrNames (inputs.llm-agents.packages.${system} or {}));
exposedPackages =
builtins.listToAttrs
(map (name: {
inherit name;
value = sharedPackages.${name};
})
exposedPackageNames);
in
builtins.removeAttrs exposedPackages [
2026-07-25 14:54:22 +02:00
# Internal helpers from packages/* marked hideFromDocs upstream:
"antigravity"
"auto-claude"
"buildNpmPackage" # ← the culprit; breaks webcord's `buildNpmPackage.override { nodejs = ...; }`
"bun2nix"
"darwinOpenptyHook"
"default" # fzf launcher; collides with nothing in nixpkgs but kept out for hygiene
"dolt" # collides with nixpkgs.dolt (Dolt database); not used in this config
"flake-inputs"
"forge"
"formatelf"
"formatter" # collides conceptually with pkgs.formatter; not used here
"go-bin"
"unpinCargoMsrvHook"
"unpinGoModVersionHook"
"versionCheckHomeHook"
"wrapBuddy"
];
2024-10-20 00:30:58 +02:00
}