mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
modules: move nixpkgs
module to top-level modules
Make `pkgs` available to files submodules by passing _all_ module args through. We already did this for `specialArgs`.
This commit is contained in:
parent
31579dc201
commit
8c3d521bff
4 changed files with 10 additions and 1 deletions
|
@ -3,7 +3,6 @@
|
|||
./assertions.nix
|
||||
./context.nix
|
||||
./meta.nix
|
||||
./nixpkgs.nix
|
||||
./nixvim-info.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
{ defaultPkgs, lib, ... }:
|
||||
let
|
||||
# TODO: https://github.com/nix-community/nixvim/issues/1784
|
||||
finalPackage = defaultPkgs;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
# We explicitly set the default override priority, so that we do not need
|
||||
# to evaluate finalPkgs in case an override is placed on `_module.args.pkgs`.
|
||||
# After all, to determine a definition priority, we need to evaluate `._type`,
|
||||
# which is somewhat costly for Nixpkgs. With an explicit priority, we only
|
||||
# evaluate the wrapper to find out that the priority is lower, and then we
|
||||
# don't need to evaluate `finalPkgs`.
|
||||
_module.args.pkgs = lib.mkOverride lib.modules.defaultOverridePriority finalPackage;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue