/nixvim-flake

Nix flake holding all of my Neovim configuration

Primary LanguageNixApache License 2.0Apache-2.0

Alesauce's Neovim Config built with nix

This flake is a standalone NixVim configuration. Feel free to use it or riff on it as you please! Just note that this is obviously my personal config and is in no way, shape, or form meant to be a general-purpose config.

A lot of credit goes to siph's nixvim flake, which is where I got the majority of my inspiration.

Development

Run once

  1. Install Nix if you don't have it already. I use the Determinate Systems Nix installer..
  2. Install direnv
  3. Clone the repo
  4. Run this command to allow direnv to set up the dev environment: cd nixvim-flake; direnv allow

Run every change

  1. git pull
  2. nix flake check --show-trace --all-systems
  3. To test how new configuration options actually look/work, run nix build, then ./result/bin/nvim <filename>

Using this flake

Run the flake directly

Run the following command:

nix run "github:alesauce/nixvim-flake" <file name>

In another flake

Add this flake as an input:

{
    description = "Example flake";

    inputs = {
        nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
        nixvim-flake = {
            url = "github:alesauce/nixvim-flake";
            inputs = {
                nixpkgs.follows = "nixpkgs";
            };
        };
    };
}

There are multiple ways to use it to replace the nvim binary that comes with nixpkgs. Here is where I use it in my system config flake:

  1. https://github.com/alesauce/nix-home/blob/main/nix/overlays/neovim.nix