nix-config/overlays/default.nix
2023-09-26 14:39:38 -04:00

37 lines
1.2 KiB
Nix

# This file defines overlays
{ inputs, ... }:
let
addPatches = pkg: patches: pkg.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or [ ]) ++ patches;
});
in
{
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs { pkgs = final; };
# This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
modifications = final: prev: {
# example = prev.example.overrideAttrs (oldAttrs: rec {
# ...
# });
passExtensions = prev.passExtensions // {
# https://github.com/tadfisher/pass-otp/pull/173
pass-otp = addPatches prev.passExtensions.pass-otp [ ./pass-otp-fix-completion.patch ];
};
# https://github.com/mdellweg/pass_secret_service/pull/37
pass-secret-service = addPatches prev.pass-secret-service [ ./pass-secret-service-native.diff ];
};
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: {
unstable = import inputs.nixpkgs-unstable {
inherit (final) system;
config.allowUnfree = true;
};
};
}