nichts/parts/pkgs/default.nix

29 lines
1.1 KiB
Nix
Raw Normal View History

2024-09-09 21:31:49 +02:00
{inputs, ...}: {
# NOTE: We use flake-parts' easyOverlay module to extend our default packages with some extra packages I want to have.
#
imports = [inputs.flake-parts.flakeModules.easyOverlay];
perSystem = {
config,
lib,
pkgs,
...
}: {
# Attributes to add to overlays.default.
# The overlays.default overlay will re-evaluate perSystem with the “prev” (or “super”) overlay argument value
# as the pkgs module argument. The easyOverlay module also adds the final module argument, for the result of applying the overlay.
# When not in an overlay, final defaults to pkgs plus the generated overlay.
# This requires Nixpkgs to be re-evaluated, which is more expensive than setting
# pkgs to a Nixpkgs that already includes the necessary overlays that are required
# for the flake itself.
overlayAttrs = config.extraPackages;
# https://noogle.dev/f/lib/filesystem/packagesFromDirectoryRecursive
extraPackages = lib.packagesFromDirectoryRecursive {
inherit (pkgs) callPackage;
directory = ./extraPackages;
};
};
}