Skip to content

Commit

Permalink
wrappers: expose config in standalone output (nix-community#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon authored Apr 1, 2024
1 parent 14fca44 commit 3f7e6ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/modules/standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

1 change: 1 addition & 0 deletions wrappers/standalone.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ default_pkgs: {
meta.mainProgram = "nvim";
})
// {
inherit config;
nixvimExtend = extension: mkNvim {imports = [mod extension];};
};
in
Expand Down

0 comments on commit 3f7e6ce

Please sign in to comment.