2023-02-06 18:58:09 +00:00
|
|
|
[[ch-hm-module]]
|
|
|
|
== Home Manager
|
|
|
|
|
|
|
|
The Home Manager module allows us to customize the different `vim` options. To use it, we first add the input flake.
|
|
|
|
|
|
|
|
[source,nix]
|
|
|
|
----
|
|
|
|
{
|
|
|
|
neovim-flake = {
|
|
|
|
url = github:notashelf/neovim-flake;
|
|
|
|
# you can override input nixpkgs
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
Followed by importing the HM module.
|
|
|
|
|
|
|
|
[source,nix]
|
|
|
|
----
|
|
|
|
{
|
2023-04-02 16:58:37 +00:00
|
|
|
imports = [ neovim-flake.homeManagerModules.default ];
|
2023-02-06 18:58:09 +00:00
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
Then we should be able to use the given module. E.g.
|
|
|
|
|
|
|
|
[source,nix]
|
|
|
|
----
|
|
|
|
{
|
|
|
|
programs.neovim-flake = {
|
2023-04-02 16:58:37 +00:00
|
|
|
|
2023-02-06 18:58:09 +00:00
|
|
|
enable = true;
|
2023-04-02 16:58:37 +00:00
|
|
|
# your settings need to go into the settings attrset
|
2023-02-06 18:58:09 +00:00
|
|
|
settings = {
|
|
|
|
vim.viAlias = false;
|
|
|
|
vim.vimAlias = true;
|
|
|
|
vim.lsp = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
----
|