mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
wrappers: add our lib to the host's _module.args
Make our "extended" lib available to host modules as `_module.args.nixvimLib`. We didn't do this before because `helpers` was too generic of a name, but `nixvimLib` should be ok. { nixvimLib, ... }: { programs.nixvim.someOption = nixvimLib.nixvim.mkRaw "print('Hi')"; }
This commit is contained in:
parent
e555ba13b1
commit
511a328aa3
2 changed files with 21 additions and 3 deletions
|
@ -44,9 +44,15 @@ in
|
|||
];
|
||||
|
||||
config = mkMerge [
|
||||
# Make our lib available to the host modules
|
||||
# TODO: import top-level ../lib
|
||||
{ lib.nixvim = lib.mkDefault (import ../lib/helpers.nix { inherit pkgs lib; }); }
|
||||
{
|
||||
# Make our lib available to the host modules
|
||||
# TODO: import top-level ../lib
|
||||
lib.nixvim = lib.mkDefault (import ../lib/helpers.nix { inherit pkgs lib; });
|
||||
|
||||
# Make nixvim's "extended" lib available to the host's module args
|
||||
_module.args.nixvimLib = lib.mkDefault config.lib.nixvim.extendedLib;
|
||||
}
|
||||
|
||||
# Propagate extraFiles to the host modules
|
||||
(optionalAttrs (filesOpt != null) (
|
||||
mkIf (!cfg.wrapRc) (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue