README: add instructions for branch selection (stable/unstable)

This commit is contained in:
Gaetan Lepage 2023-08-18 10:53:02 +02:00 committed by Gaétan Lepage
parent ad3598cada
commit 07af7710e2

View file

@ -36,10 +36,11 @@ If you have any question, please use the [discussions page](https://github.com/n
## Installation
NixVim needs to be installed with a compatible nixpkgs version.
This means that the `main` branch of NixVim requires to be installed with `nixos-unstable`.
If you want to use NixVim with nixpkgs 23.05 you should use the `nixos-23.05` branch.
**WARNING !**
> NixVim needs to be installed with a compatible nixpkgs version.
> This means that the `main` branch of NixVim requires to be installed with `nixos-unstable`.
>
> If you want to use NixVim with nixpkgs 23.05 you should use the `nixos-23.05` branch.
### Without flakes
NixVim now ships with `flake-compat`, which makes it usable from any system.
@ -51,6 +52,8 @@ To install it, edit your home-manager (or NixOS) configuration:
let
nixvim = import (builtins.fetchGit {
url = "https://github.com/nix-community/nixvim";
# If you are not running an unstable channel of nixpkgs, select the corresponding branch of nixvim.
# ref = "nixos-23.05";
});
in
{
@ -88,7 +91,13 @@ flakes, just add the nixvim input:
```nix
{
# ...
inputs.nixvim.url = "github:nix-community/nixvim";
inputs.nixvim = {
url = "github:nix-community/nixvim";
# If you are not running an unstable channel of nixpkgs, select the corresponding branch of nixvim.
# url = "github:nix-community/nixvim/nixos-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
}
```