mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
misc: added flake template (#219)
* Added simple flake template * Added readme to template * Updated readme to show how to use the template * Formatting * removed unused file from template * Fixed template url and pkgs * Formatting
This commit is contained in:
parent
6e027c40f2
commit
2258eb8df8
9 changed files with 133 additions and 26 deletions
15
README.md
15
README.md
|
@ -82,8 +82,8 @@ for a home-manager installation, `inputs.nixvim.nixosModules.nixvim`, for NixOS,
|
|||
and `inputs.nixvim.nixDarwinModules.nixvim` for nix-darwin.
|
||||
|
||||
## Usage
|
||||
NixVim can be used in four ways: through the home-manager, nix-darwin, and NixOS modules,
|
||||
and through the `makeNixvim` function. To use the modules, just import the
|
||||
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
|
||||
`nixvim.homeManagerModules.nixvim`, `nixvim.nixDarwinModules.nixvim`, and
|
||||
`nixvim.nixosModules.nixvim` modules, depending on which system
|
||||
you're using.
|
||||
|
@ -100,9 +100,18 @@ If you want to use it standalone, you can use the `makeNixvim` function:
|
|||
}
|
||||
```
|
||||
|
||||
To get started with a standalone configuration you can use the template by running the following command in an empty directory (recommended):
|
||||
|
||||
```
|
||||
nix flake init --template github:pta2002/nixvim
|
||||
```
|
||||
|
||||
Alternatively if you want a minimal flake to allow building a custom neovim you
|
||||
can use the following:
|
||||
|
||||
<details>
|
||||
<summary>Minimal flake configuration</summary>
|
||||
|
||||
```nix
|
||||
{
|
||||
description = "A very basic flake";
|
||||
|
@ -132,6 +141,8 @@ can use the following:
|
|||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
You can then run neovim using `nix run .# -- <file>`. This can be useful to test
|
||||
config changes easily.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue