mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-02 17:15:01 +02:00
modules/nixpkgs: initial pkgs
option, drop defaultPkgs
specialArg
This minimal implementation allows `nixpkgs.pkgs` to be defined, but does not implement evaluating an instance from a pkgsPath when _not_ defined. The `defaultPkgs` specialArg is dropped in favour of `nixpkgs.pkgs` being defined. If it's not defined, an assertion is thrown. In the future, a nixpkgs source path can be supplied, defaulting to the flake's `inputs.nixpkgs`. Along with other `nixpkgs.*` options, this will allow a `pkgs` instance to be evaluated within the module eval.
This commit is contained in:
parent
8c3d521bff
commit
4b7a41276a
11 changed files with 111 additions and 43 deletions
|
@ -3,6 +3,7 @@
|
|||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
makeNixvimWithModule,
|
||||
...
|
||||
}:
|
||||
|
@ -12,9 +13,12 @@
|
|||
makeNixvim = module: makeNixvimWithModule { inherit module; };
|
||||
|
||||
nixvimConfiguration = helpers.modules.evalNixvim {
|
||||
extraSpecialArgs = {
|
||||
defaultPkgs = pkgs;
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
_file = ./legacy-packages.nix;
|
||||
nixpkgs.pkgs = lib.mkDefault pkgs;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue