nix-community / kickstart-nix.nvim

❄️ A dead simple Nix flake template repository for Neovim derivations [maintainer=@mrcjkb]
GNU General Public License v2.0
231 stars 10 forks source link

How to install overlay #2

Closed Doosty closed 1 year ago

Doosty commented 1 year ago

Hi, sorry for newbie nix question but i have never used an overlay before and having trouble installing this. I am using this base starter config https://github.com/Misterio77/nix-starter-configs/tree/main/standard and i have created a repo from your template. Ive tried dozens on configurations and this is the only one that managed to build. However nvim is not available afterwards. Help much appreciated.

  # flake.nix
  inputs = {
    kickstart-nix-nvim.url = "github:doosty/kickstart-nix.nvim";
  };
  outputs = {
    kickstart-nix-nvim,
  }
# ./nixos/configuration.nix
{
  inputs,
  ...
}: {
  nixpkgs = {
    overlays = [
      inputs.kickstart-nix-nvim.overlays.default
    ];
  };

  environment.systemPackages = with pkgs; [
    inputs.kickstart-nix-nvim
  ];
}
mrcjkb commented 1 year ago

Hey 👋

The package provided by the overlay in the template is called nvim-pkg.

So after applying the overlay, you can add:

environment.systemPackages = with pkgs; [
  nvim-pkg
];

I'll update the readme with some more detailed instructions for NixOS soon 😃

Doosty commented 1 year ago

Thanks for the reply, yes now the package is being used however with the following error. When i tinkered around a bit it started saing wf-nvim is missing. It seems like the plugin-overlay.nix is not applied?

[ERROR]   stderr)        error: attribute 'nvimPlugins' missing
[ERROR]   stderr)
[ERROR]   stderr)        at /nix/store/7dq64ag1q9zqcid76hbh7h2zn9q87csn-source/nix/neovim-overlay.nix:60:14:
mrcjkb commented 1 year ago

Oh yeah, that's a bug. I've just fixed it. You can apply this patch to your repo with git apply fix.path

https://gist.github.com/mrcjkb/54f75261bf9110b43230ea55692c9088

Doosty commented 1 year ago

Works, thanks for the help! Now i just need to learn to configure nvim :smiling_face_with_tear: