diff --git a/docs/user-guide/helpers.md b/docs/user-guide/helpers.md index 99915487..61f3efe1 100644 --- a/docs/user-guide/helpers.md +++ b/docs/user-guide/helpers.md @@ -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 diff --git a/wrappers/_shared.nix b/wrappers/_shared.nix index 0aca2c60..af9848b5 100644 --- a/wrappers/_shared.nix +++ b/wrappers/_shared.nix @@ -29,20 +29,24 @@ let extraFiles = lib.filter (file: file.enable) (lib.attrValues cfg.extraFiles); in { - options = { - nixvim.helpers = mkOption { - type = mkOptionType { - name = "helpers"; - description = "Helpers that can be used when writing nixvim configs"; - check = isAttrs; - }; - description = "Use this option to access the helpers"; - }; - }; + # TODO: Added 2024-07-24; remove after 24.11 + imports = [ + (lib.mkRenamedOptionModule + [ + "nixvim" + "helpers" + ] + [ + "lib" + "nixvim" + ] + ) + ]; config = mkMerge [ # Make our lib available to the host modules - { nixvim.helpers = lib.mkDefault (import ../lib/helpers.nix { inherit pkgs lib; }); } + # TODO: import top-level ../lib + { lib.nixvim = lib.mkDefault (import ../lib/helpers.nix { inherit pkgs lib; }); } # Propagate extraFiles to the host modules (optionalAttrs (filesOpt != null) ( mkIf (!cfg.wrapRc) (