mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-24 04:35:08 +02:00
docs: move standalone example to platform usage
This commit is contained in:
parent
87df94dcbd
commit
226c555d8f
2 changed files with 17 additions and 11 deletions
|
@ -7,6 +7,21 @@ This is unlike the other modules which typically use a `programs.nixvim.*` prefi
|
||||||
|
|
||||||
There are **no** standalone-specific options available.
|
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
|
## Extending an existing configuration
|
||||||
|
|
||||||
Given a `nvim` derivation obtained from `makeNixvim` or `makeNivxmiWithModule` it is possible to create a new derivation with additional options.
|
Given a `nvim` derivation obtained from `makeNixvim` or `makeNivxmiWithModule` it is possible to create a new derivation with additional options.
|
||||||
|
|
|
@ -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!
|
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`):
|
For more information see [Standalone Usage](../modules/standalone.md).
|
||||||
```nix
|
|
||||||
{ inputs, system, ... }:
|
|
||||||
{
|
|
||||||
# NixOS
|
|
||||||
environment.systemPackages = [ inputs.nixvim-config.packages.${system}.default ];
|
|
||||||
# home-manager
|
|
||||||
home.packages = [ inputs.nixvim-config.packages.${system}.default ];
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue