docs: move standalone example to platform usage

This commit is contained in:
Matt Sturgeon 2024-04-01 13:19:21 +01:00 committed by Gaétan Lepage
parent 87df94dcbd
commit 226c555d8f
2 changed files with 17 additions and 11 deletions

View file

@ -7,6 +7,21 @@ This is unlike the other modules which typically use a `programs.nixvim.*` prefi
There are **no** standalone-specific options available.
## Using in another configuration
Here is an example on how to integrate into a NixOS or Home-manager configuration when using flakes.
The example assumes your standalone config is the `default` package of a flake, and you've named the input "`nixvim-config`".
```nix
{ inputs, system, ... }:
{
# NixOS
environment.systemPackages = [ inputs.nixvim-config.packages.${system}.default ];
# home-manager
home.packages = [ inputs.nixvim-config.packages.${system}.default ];
}
```
## Extending an existing configuration
Given a `nvim` derivation obtained from `makeNixvim` or `makeNivxmiWithModule` it is possible to create a new derivation with additional options.