docs: rename all instances of neovim-flake to nvf

This commit is contained in:
raf 2024-04-27 15:44:37 +03:00
commit 227f80ac9d
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
36 changed files with 430 additions and 278 deletions

View file

@ -1,7 +1,9 @@
# Home Manager Module {#ch-hm-module}
# Home-Manager Module {#ch-hm-module}
The Home Manager module allows us to customize the different `vim` options from inside the home-manager configuration
and it is the preferred way of configuring neovim-flake, both on NixOS and non-NixOS systems.
The home-manager module allows us to customize the different `vim` options from
inside the home-manager configuration without having to call for the wrapper
yourself. It is the recommended way to use **nvf** alongside the NixOS module
depending on your needs.
To use it, we first add the input flake.
@ -9,8 +11,8 @@ To use it, we first add the input flake.
{
inputs = {
obsidian-nvim.url = "github:epwalsh/obsidian.nvim";
neovim-flake = {
url = "github:notashelf/neovim-flake";
nvf = {
url = "github:notashelf/nvf";
# you can override input nixpkgs
inputs.nixpkgs.follows = "nixpkgs";
# you can also override individual plugins
@ -25,41 +27,41 @@ Followed by importing the home-manager module somewhere in your configuration.
```nix
{
# assuming neovim-flake is in your inputs and inputs is in the argset
imports = [ inputs.neovim-flake.homeManagerModules.default ];
# assuming nvf is in your inputs and inputs is in the argset
# see example below
imports = [ inputs.nvf.homeManagerModules.default ];
}
```
An example installation for neovim-flake under standalone home-manager
would look like this:
## Example Installation {#sec-example-installation}
```nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
neovim-flake.url = "github:notashelf/neovim-flake";
nvf.url = "github:notashelf/nvf";
};
outputs = { nixpkgs, home-manager, neovim-flake ... }: let
outputs = { nixpkgs, home-manager, nvf, ... }: let
system = "x86_64-linux"; in {
# ↓ this is the home-manager output in the flake schema
homeConfigurations."yourUsername»" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
# ↓ this is your home output in the flake schema, expected by home-manager
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration
modules = [
neovim-flake.homeManagerModules.default # <- this imports the home-manager module that provides the options
./home.nix # your home-manager configuration, probably where you will want to add programs.neovim-flake options
nvf.homeManagerModules.default # <- this imports the home-manager module that provides the options
./home.nix # <- your home entrypoint
];
};
};
}
```
Once the module is imported, we will be able to define the following options (and much more) from inside the
home-manager configuration.
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.neovim-flake = {
programs.nvf = {
enable = true;
# your settings need to go into the settings attribute set
# most settings are documented in the appendix
@ -74,6 +76,8 @@ home-manager configuration.
}
```
:::{.note}
You may find all avaliable options in the [appendix](https://notashelf.github.io/neovim-flake/options)
::: {.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)
:::

View file

@ -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)
:::