Installing neovim latest master and configuring it

Hi, complete beginner here, installed NixOS yesterday. I’m trying to get both the latest master of neovim and customize it by installing plugins.

I found a github issue that explains how to install the latest master. So I created an overlay ~/.config/nixpkgs/overlays/neovim.nix with that code and it works. I then wanted to install plugins, so I created another overlay in the same folder. In there, I’m basically just doing

self: super: {
  neovim = super.neovim.override {
    configure = {
      packages.myPackages = with super.vimPlugins; {
        start = [ rust-lang/rust.vim ];
      };
    };
  }
}

Additionally, I want to separate system and user packages but by relying on vanilla NixOS so I have one more overlay called mypackages.nix where I do stuff like

self: super: {
  myPackages = self.buildEnv {
    name = "myPackages";
    paths = with self.pkgs { neovim };
  };
};

Now if I run nix-env -iA nixos.myPackages I get

error: getting attributes of path '/home/myname/.config/nixpkgs/overlays/rust-lang/rust.vim' no such file

Now my question… why is it trying to construct a path to a plugin which is relativ to my overlays directory?

Embarassing. Using rust-lang/rust.vim breaks because of the slash. Wrapping it in quotes "rust-lang/rust.vim" works ~_~

1 Like