mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 19:46:06 +01:00
docs: use official names of NixOS, Home Manager and nix-darwin
This commit is contained in:
parent
e006fa229c
commit
4c4cac6445
11 changed files with 22 additions and 22 deletions
10
README.md
10
README.md
|
|
@ -42,7 +42,7 @@ Check out [this list of real world Nixvim configs](https://nix-community.github.
|
||||||
<!-- STOP DOCS -->
|
<!-- STOP DOCS -->
|
||||||
|
|
||||||
## How does it work?
|
## How does it work?
|
||||||
When you build the module (probably using home-manager), it will install all
|
When you build the module (probably using Home Manager), it will install all
|
||||||
your plugins and generate a lua config for Neovim with all the options
|
your plugins and generate a lua config for Neovim with all the options
|
||||||
specified. Because it uses lua, this ensures that your configuration will load
|
specified. Because it uses lua, this ensures that your configuration will load
|
||||||
as fast as possible.
|
as fast as possible.
|
||||||
|
|
@ -100,7 +100,7 @@ For more detail, see the [Installation](https://nix-community.github.io/nixvim)
|
||||||
|
|
||||||
Nixvim now ships with `flake-compat`, which makes it usable from any system.
|
Nixvim now ships with `flake-compat`, which makes it usable from any system.
|
||||||
|
|
||||||
To install it, edit your home-manager (or NixOS) configuration:
|
To install it, edit your Home Manager, NixOS or nix-darwin configuration:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
@ -113,7 +113,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# For home-manager
|
# For Home Manager
|
||||||
nixvim.homeModules.nixvim
|
nixvim.homeModules.nixvim
|
||||||
# For NixOS
|
# For NixOS
|
||||||
nixvim.nixosModules.nixvim
|
nixvim.nixosModules.nixvim
|
||||||
|
|
@ -159,13 +159,13 @@ flakes, just add the `nixvim` input:
|
||||||
```
|
```
|
||||||
|
|
||||||
You can now access the module using `inputs.nixvim.homeModules.nixvim`,
|
You can now access the module using `inputs.nixvim.homeModules.nixvim`,
|
||||||
for a home-manager installation, `inputs.nixvim.nixosModules.nixvim`, for NixOS,
|
for a Home Manager installation, `inputs.nixvim.nixosModules.nixvim`, for NixOS,
|
||||||
and `inputs.nixvim.nixDarwinModules.nixvim` for nix-darwin.
|
and `inputs.nixvim.nixDarwinModules.nixvim` for nix-darwin.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Nixvim can be used in four ways: through the home-manager, nix-darwin, NixOS modules,
|
Nixvim can be used in four ways: through the Home Manager, nix-darwin, NixOS modules,
|
||||||
and standalone through the `makeNixvim` function. To use the modules, just import the
|
and standalone through the `makeNixvim` function. To use the modules, just import the
|
||||||
`nixvim.homeModules.nixvim`, `nixvim.nixDarwinModules.nixvim`, and
|
`nixvim.homeModules.nixvim`, `nixvim.nixDarwinModules.nixvim`, and
|
||||||
`nixvim.nixosModules.nixvim` modules, depending on which system
|
`nixvim.nixosModules.nixvim` modules, depending on which system
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ If Nixvim is built using the standalone method, you can access our "helpers" as
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
If Nixvim is being used as as a home-manager module, a nixos module, or as a darwin module, our "helpers" can be accessed via the `config.lib` option:
|
If Nixvim is being used as as a Home Manager module, a NixOS module, or as a nix-darwin module, our "helpers" can be accessed via the `config.lib` option:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@
|
||||||
NixVim options specification
|
NixVim options specification
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
.PP
|
.PP
|
||||||
This page lists all the options that can be used in NixVim. It can either be used as a Home-Manager module, an NixOS module or a standalone package. Please refer to the installation instructions for more details.
|
This page lists all the options that can be used in NixVim. It can either be used as a Home Manager module, an NixOS module or a standalone package. Please refer to the installation instructions for more details.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Platform-specific options
|
# Platform-specific options
|
||||||
|
|
||||||
All of Nixvim's options are available within `programs.nixvim.*` when Nixvim is used via wrapper modules,
|
All of Nixvim's options are available within `programs.nixvim.*` when Nixvim is used via wrapper modules,
|
||||||
such as our NixOS, home-manager, or nix-darwin modules.
|
such as our NixOS, Home Manager, or nix-darwin modules.
|
||||||
|
|
||||||
When Nixvim is used standalone (without a wrapper module), its options are available at the "top-level".
|
When Nixvim is used standalone (without a wrapper module), its options are available at the "top-level".
|
||||||
See [Standalone Usage](./standalone.md) for more info.
|
See [Standalone Usage](./standalone.md) for more info.
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ There are **no** standalone-specific options available.
|
||||||
|
|
||||||
## Using in another configuration
|
## Using in another configuration
|
||||||
|
|
||||||
Here is an example on how to integrate into a NixOS or Home-manager configuration when using flakes.
|
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`".
|
The example assumes your standalone config is the `default` package of a flake, and you've named the input "`nixvim-config`".
|
||||||
```nix
|
```nix
|
||||||
|
|
@ -17,7 +17,7 @@ The example assumes your standalone config is the `default` package of a flake,
|
||||||
{
|
{
|
||||||
# NixOS
|
# NixOS
|
||||||
environment.systemPackages = [ inputs.nixvim-config.packages.${system}.default ];
|
environment.systemPackages = [ inputs.nixvim-config.packages.${system}.default ];
|
||||||
# home-manager
|
# Home Manager
|
||||||
home.packages = [ inputs.nixvim-config.packages.${system}.default ];
|
home.packages = [ inputs.nixvim-config.packages.${system}.default ];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
@ -53,7 +53,7 @@ This will generate a `init.lua` that will contain the comments from each stages:
|
||||||
|
|
||||||
The `config` used to produce a standalone nixvim derivation can be accessed as an attribute on the derivation, similar to `<nixvim>.extend`.
|
The `config` used to produce a standalone nixvim derivation can be accessed as an attribute on the derivation, similar to `<nixvim>.extend`.
|
||||||
|
|
||||||
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.
|
This may be useful if you want unrelated parts of your NixOS, Home Manager or nix-darwin configuration to use the same value as something in your nixvim configuration.
|
||||||
|
|
||||||
## Accessing nixvim options
|
## Accessing nixvim options
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ This usually means one of two things:
|
||||||
When building nixvim using flakes and our ["standalone mode"][standalone], we usually recommend _not_ declaring a "follows" for `inputs.nixvim`.
|
When building nixvim using flakes and our ["standalone mode"][standalone], we usually recommend _not_ declaring a "follows" for `inputs.nixvim`.
|
||||||
This is so that nixvim is built against the same nixpkgs revision we're using in our test suite.
|
This is so that nixvim is built against the same nixpkgs revision we're using in our test suite.
|
||||||
|
|
||||||
If you are building nixvim using the NixOS, home-manager, or nix-darwin modules then we advise that you keep your nixpkgs lock as close as possible to ours.
|
If you are building nixvim using the NixOS, Home Manager, or nix-darwin modules then we advise that you keep your nixpkgs lock as close as possible to ours.
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> Once [#1784](https://github.com/nix-community/nixvim/issues/1784) is implemented, there will be alternative ways to achieve this using the module system.
|
> Once [#1784](https://github.com/nix-community/nixvim/issues/1784) is implemented, there will be alternative ways to achieve this using the module system.
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Failure to use the correct branch, or an old revision of nixpkgs will likely res
|
||||||
|
|
||||||
NixVim can be used in four ways:
|
NixVim can be used in four ways:
|
||||||
- As a NixOS module
|
- As a NixOS module
|
||||||
- As a Home-Manager module
|
- As a Home Manager module
|
||||||
- As a nix-darwin module
|
- As a nix-darwin module
|
||||||
- As a standalone derivation
|
- As a standalone derivation
|
||||||
|
|
||||||
|
|
@ -45,14 +45,14 @@ When using flakes you can simply add `nixvim` to the inputs:
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
NixVim can be used standalone or as a module for NixOS, home-manager, or nix-darwin.
|
NixVim can be used standalone or as a module for NixOS, Home Manager, or nix-darwin.
|
||||||
|
|
||||||
When used standalone, a custom NixVim derivation is produced that can be used like any other package.
|
When used standalone, a custom NixVim derivation is produced that can be used like any other package.
|
||||||
|
|
||||||
When used as a module, NixVim can be enabled though `programs.nixvim.enable`.
|
When used as a module, NixVim can be enabled though `programs.nixvim.enable`.
|
||||||
|
|
||||||
|
|
||||||
### Usage as a module (NixOS, home-manager, nix-darwin)
|
### Usage as a module (NixOS, Home Manager, nix-darwin)
|
||||||
|
|
||||||
When using NixVim as a module you must import the NixVim module into your module system.
|
When using NixVim as a module you must import the NixVim module into your module system.
|
||||||
The three imports are:
|
The three imports are:
|
||||||
|
|
@ -92,7 +92,7 @@ options as `programs.nixvim.<path>.<to>.<option> = <value>`.
|
||||||
> }
|
> }
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
When you use nixvim as a module, an additional module argument is passed on allowing you to peek through the configuration with `hmConfig`, `nixosConfig`, and `darwinConfig` for home-manager, NixOS, and nix-darwin respectively.
|
When you use nixvim as a module, an additional module argument is passed on allowing you to peek through the configuration with `hmConfig`, `nixosConfig`, and `darwinConfig` for Home Manager, NixOS, and nix-darwin respectively.
|
||||||
This is useful if you use nixvim both as part of an environment and standalone.
|
This is useful if you use nixvim both as part of an environment and standalone.
|
||||||
|
|
||||||
For more platform-specific options and information, see [Nixvim Platforms](../platforms/index.md).
|
For more platform-specific options and information, see [Nixvim Platforms](../platforms/index.md).
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ in
|
||||||
evaluation of Nixpkgs, for example.
|
evaluation of Nixpkgs, for example.
|
||||||
Applications like this should set their default value using `lib.mkDefault`,
|
Applications like this should set their default value using `lib.mkDefault`,
|
||||||
so user-provided configuration can override it without using `lib`.
|
so user-provided configuration can override it without using `lib`.
|
||||||
E.g. Nixvim's home-manager module can re-use the `pkgs` instance from the "host" modules.
|
E.g. Nixvim's Home Manager module can re-use the `pkgs` instance from the "host" modules.
|
||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> Changing this option can lead to issues that may be difficult to debug.
|
> Changing this option can lead to issues that may be difficult to debug.
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ in
|
||||||
When enabled, the nixvim config will be passed to `nvim` using the `-u` option.
|
When enabled, the nixvim config will be passed to `nvim` using the `-u` option.
|
||||||
'';
|
'';
|
||||||
defaultText = lib.literalMD ''
|
defaultText = lib.literalMD ''
|
||||||
Configured by your installation method: `false` when using the home-manager module, `true` otherwise.
|
Configured by your installation method: `false` when using the Home Manager module, `true` otherwise.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ in
|
||||||
If disabled, the XDG config dirs `nvim` and `nvim/after` will be removed from the runtimepath.
|
If disabled, the XDG config dirs `nvim` and `nvim/after` will be removed from the runtimepath.
|
||||||
'';
|
'';
|
||||||
defaultText = lib.literalMD ''
|
defaultText = lib.literalMD ''
|
||||||
Configured by your installation method: `true` when using the home-manager module, `false` otherwise.
|
Configured by your installation method: `true` when using the Home Manager module, `false` otherwise.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||||
```
|
```
|
||||||
|
|
||||||
If you're using nixos or home-manager to manager tmux, you can use the `programs.tmux.plugins` option for this:
|
If you're using NixOS or Home Manager to manager tmux, you can use the `programs.tmux.plugins` option for this:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
plugins.tmux.plugins = [
|
plugins.tmux.plugins = [
|
||||||
|
|
@ -60,7 +60,7 @@ lib.nixvim.plugins.mkVimPlugin {
|
||||||
|
|
||||||
Alternatively, you can specify the keybinding in your tmux config.
|
Alternatively, you can specify the keybinding in your tmux config.
|
||||||
|
|
||||||
If you're using nixos or home-manager to manager tmux, you can use the `programs.tmux.extraConfig` option for this.
|
If you're using NixOS or Home Manager to manager tmux, you can use the `programs.tmux.extraConfig` option for this.
|
||||||
|
|
||||||
Example config from the [upstream docs]:
|
Example config from the [upstream docs]:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ let
|
||||||
homeManagerConfiguration
|
homeManagerConfiguration
|
||||||
;
|
;
|
||||||
|
|
||||||
# This test module declares a nixvim option from a home-manager module
|
# This test module declares a nixvim option from a Home Manager module
|
||||||
# The module system will attempt an option-type merge on the `programs.nixvim` option,
|
# The module system will attempt an option-type merge on the `programs.nixvim` option,
|
||||||
# extending the submodule-type with an extra module declaring the nixvim option.
|
# extending the submodule-type with an extra module declaring the nixvim option.
|
||||||
test-module =
|
test-module =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue