wrappers: make helpers available via lib option

NixOS, HM, & Darwin provide a `lib` option, not to be confused with the
`lib` module arg.

This option is intended for modules to define custom functions without
having to extend nixpkgs lib.

The old option is renamed, if it is accessed it will print:

    trace: Obsolete option `nixvim.helpers' is used. It was renamed to `lib.nixvim'.
This commit is contained in:
Matt Sturgeon 2024-07-08 05:12:24 +01:00
parent 0ac10f6776
commit 216d64c158
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 17 additions and 13 deletions

View file

@ -10,12 +10,12 @@ If Nixvim is built using the standalone method, you can access our `helpers` as
```
If Nixvim is being used as as a home-manager module, a nixos module, or as a dawwin module,
helpers can be accessed via the `config.nixvim.helpers` option:
helpers can be accessed via the `config.lib` option:
```nix
{ config, ... }:
let
inherit (config.nixvim) helpers;
helpers = config.lib.nixvim;
in
{
# Your config