mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
lib/modules: pass inputs.nixpkgs
into evalNixvim
Expose our locked nixpkgs as the `nixpkgs.source` module options. This only happens when `evalNixvim` is part of a lib that was provided `flake` as an argument. Stubbed the `nixpkgs.source` option for now. Eventually, this will be used to construct `pkgs` internally. For now, it's purely informational.
This commit is contained in:
parent
e16d244865
commit
bef9feb446
11 changed files with 62 additions and 11 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
self,
|
||||
flake ? null,
|
||||
}:
|
||||
let
|
||||
removed = {
|
||||
|
@ -29,7 +30,15 @@ in
|
|||
Nixvim requires a lib that includes some custom extensions, however the `lib` from `specialArgs` does not have a `nixvim` attr.
|
||||
Remove `lib` from nixvim's `specialArgs` or ensure you apply nixvim's extensions to your `lib`.'';
|
||||
lib.evalModules {
|
||||
modules = [ ../modules/top-level ] ++ modules;
|
||||
modules = modules ++ [
|
||||
../modules/top-level
|
||||
|
||||
# Pass our locked nixpkgs into the configuration
|
||||
(lib.optionalAttrs (flake != null) {
|
||||
_file = "<nixvim-flake>";
|
||||
nixpkgs.source = lib.mkOptionDefault flake.inputs.nixpkgs;
|
||||
})
|
||||
];
|
||||
specialArgs = {
|
||||
inherit lib;
|
||||
# TODO: deprecate `helpers`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue