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
|
./assertions.nix
|
||||||
./context.nix
|
./context.nix
|
||||||
./meta.nix
|
./meta.nix
|
||||||
./nixpkgs.nix
|
|
||||||
./nixvim-info.nix
|
./nixvim-info.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
../.
|
../.
|
||||||
./files
|
./files
|
||||||
|
./nixpkgs.nix
|
||||||
./output.nix
|
./output.nix
|
||||||
./readonly-renames.nix
|
./readonly-renames.nix
|
||||||
./test.nix
|
./test.nix
|
||||||
|
|
|
@ -15,6 +15,15 @@ let
|
||||||
modules = lib.optionals (!config.isDocs) [
|
modules = lib.optionals (!config.isDocs) [
|
||||||
../../.
|
../../.
|
||||||
./submodule.nix
|
./submodule.nix
|
||||||
|
# Pass module args through to the submodule (except `name`)
|
||||||
|
# Wrap each arg with the correct priority
|
||||||
|
{
|
||||||
|
_module.args = lib.pipe options._module.args [
|
||||||
|
lib.modules.mergeAttrDefinitionsWithPrio
|
||||||
|
(lib.flip builtins.removeAttrs [ "name" ])
|
||||||
|
(lib.mapAttrs (_: { highestPrio, value }: lib.mkOverride highestPrio value))
|
||||||
|
];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
description = "Nixvim configuration";
|
description = "Nixvim configuration";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue