Skip to content

Commit

Permalink
docs: move standalone example to platform usage
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon authored and GaetanLepage committed Apr 1, 2024
1 parent 87df94d commit 226c555
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
15 changes: 15 additions & 0 deletions docs/modules/standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
13 changes: 2 additions & 11 deletions docs/user-guide/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ There are also some helper functions in `<nixvim>.lib.${system}` like:

The nixvim derivation can then be used like any other package!

For more information you can look at the [nixvim standalone flake template](https://github.com/nix-community/nixvim/blob/main/templates/simple/flake.nix).
For an example, see the [nixvim standalone flake template](https://github.com/nix-community/nixvim/blob/main/templates/simple/flake.nix).

Here is an example on how to integrate into a NixOS or Home-manager configuration when using flake parts (assuming your standalone flake's input is `nixvim-config`):
```nix
{ inputs, system, ... }:
{
# NixOS
environment.systemPackages = [ inputs.nixvim-config.packages.${system}.default ];
# home-manager
home.packages = [ inputs.nixvim-config.packages.${system}.default ];
}
```
For more information see [Standalone Usage](../modules/standalone.md).

0 comments on commit 226c555

Please sign in to comment.