diff --git a/docs/modules/standalone.md b/docs/modules/standalone.md index 991661b7..bd5a0441 100644 --- a/docs/modules/standalone.md +++ b/docs/modules/standalone.md @@ -49,3 +49,9 @@ in This will generate a `init.lua` that will contain the three comments from each stages. +## Accessing options used in an existing configuration + +The `config` used to produce a standalone nixvim derivation can be accessed as an attribute on the derivation, similar to `nixvimExtend`. + +This may be useful if you want unrelated parts of your NixOS or home-manager configuration to use the same value as something in your nixvim configuration. + diff --git a/wrappers/standalone.nix b/wrappers/standalone.nix index 09eb487f..bc739340 100644 --- a/wrappers/standalone.nix +++ b/wrappers/standalone.nix @@ -52,6 +52,7 @@ default_pkgs: { meta.mainProgram = "nvim"; }) // { + inherit config; nixvimExtend = extension: mkNvim {imports = [mod extension];}; }; in