mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-07 19:01:35 +00:00
docs: rename all instances of neovim-flake
to nvf
This commit is contained in:
parent
ebe0d6c960
commit
227f80ac9d
36 changed files with 430 additions and 278 deletions
|
@ -1,3 +1,82 @@
|
|||
# NixOS Module {#ch-nixos-module}
|
||||
|
||||
This artice is a stub. It will be written as the NixOS module is finalized.
|
||||
The NixOS module allows us to customize the different `vim` options from inside
|
||||
the NixOS configuration without having to call for the wrapper yourself. It is
|
||||
the recommended way to use **nvf** alongside the home-manager module depending
|
||||
on your needs.
|
||||
|
||||
To use it, we first add the input flake.
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
obsidian-nvim.url = "github:epwalsh/obsidian.nvim";
|
||||
nvf = {
|
||||
url = "github:notashelf/nvf";
|
||||
# you can override input nixpkgs
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
# you can also override individual plugins
|
||||
# for example:
|
||||
inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Followed by importing the NixOS module somewhere in your configuration.
|
||||
|
||||
```nix
|
||||
{
|
||||
# assuming nvf is in your inputs and inputs is in the argset
|
||||
# see example below
|
||||
imports = [ inputs.nvf.nixosModules.default ];
|
||||
}
|
||||
```
|
||||
|
||||
## Example Installation {#sec-example-installation}
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nvf.url = "github:notashelf/nvf";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, nvf, ... }: let
|
||||
system = "x86_64-linux"; in {
|
||||
# ↓ this is your host output in the flake schema
|
||||
nixosConfigurations."yourUsername»" = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
nvf.nixosModules.default # <- this imports the NixOS module that provides the options
|
||||
./configuration.nix # <- your host entrypoint
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Once the module is properly imported by your host, you will be able to use the
|
||||
`programs.nvf` module option anywhere in your configuration in order to
|
||||
configure **nvf**.
|
||||
|
||||
```nix{
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
# your settings need to go into the settings attribute set
|
||||
# most settings are documented in the appendix
|
||||
settings = {
|
||||
vim.viAlias = false;
|
||||
vim.vimAlias = true;
|
||||
vim.lsp = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
::: {.note}
|
||||
**nvf** exposes a lot of options, most of which are not referenced in the
|
||||
installation sections of the manual. You may find all avaliable options
|
||||
in the [appendix](https://notashelf.github.io/nvf/options)
|
||||
:::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue