nix-config/overlays/default.nix

41 lines
1.3 KiB
Nix
Raw Permalink 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 19:45:31 +00:00
# Add our custom packages from the 'pkgs' directory
additions = final: prev: import ../pkgs { pkgs = final; } // {
formats = prev.formats // import ../pkgs/formats { pkgs = final; };
vimPlugins = prev.vimPlugins // final.callPackage ../pkgs/vim-plugins { };
};
2023-09-26 17:44:54 +00:00
2023-09-26 19:45:31 +00:00
# Modify existing packages; change versions, add patches, set compilation
# flags, anything really.
2023-09-26 17:44:54 +00:00
# https://nixos.wiki/wiki/Overlays
2023-09-26 19:45:31 +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;
};
};
}