nix-config/overlays/default.nix

38 lines
1.2 KiB
Nix
Raw Normal View History

2023-09-26 17:44:54 +00:00
# This file defines overlays
2023-09-25 18:53:08 +00:00
{ inputs, ... }:
2023-09-26 18:39:38 +00:00
let
addPatches = pkg: patches: pkg.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or [ ]) ++ patches;
});
in
{
2023-09-26 17:44:54 +00:00
# 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
2023-09-26 18:39:38 +00:00
modifications = final: prev: {
2023-09-26 17:44:54 +00:00
# example = prev.example.overrideAttrs (oldAttrs: rec {
# ...
# });
2023-09-26 18:39:38 +00:00
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 ];
};
2023-09-26 17:44:54 +00:00
# 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;
};
};
}