Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

140 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finally

After much struggling I've figured out how to make a neovim flake which works how I want it too

Test it out

With flakes enabled

nix run github:Gerg-L/nvim-flake

Legacy

nix-shell -p 'with import <nixpkgs> {}; builtins.fetchTarball "https://github.com/Gerg-L/nvim-flake/archive/master.tar.gz" ' --run nvim

To install

Flakes

Add this flake as an input

#flake.nix
{
  inputs = {
    nvim-flake = {
      url = "github:Gerg-L/nvim-flake";
      inputs.nixpkgs.follows = "nixpkgs";
    };
...

(Make sure you're passing inputs to your modules)

Add to user environment

#anyModule.nix
{inputs, pkgs, ...}:
{

# add system wide
  environment.systemPackages = [
    inputs.nvim-flake.packages.${pkgs.system}.neovim
  ];
# add per-user
  users.users."<name>".packages = [
    inputs.nvim-flake.packages.${pkgs.system}.neovim
  ];
}

Legacy

Use fetchTarball

#anyModule.nix
{pkgs, ...}:
let
  nvim-flake = import (builtins.fetchTarball {
  # Get the revision by choosing a version from https://github.com/Gerg-L/nvim-flake/commits/master
  url = "https://github.com/Gerg-L/nvim-flake/archive/<revision>.tar.gz";
  # Get the hash by running `nix-prefetch-url --unpack <url>` on the above url
  sha256 = "<hash>";
});
in
{
# add system wide
  environment.systemPackages = [
    nvim-flake.packages.${pkgs.system}.neovim
  ];
# add per-user
  users.users."<name>".packages = [
    nvim-flake.packages.${pkgs.system}.neovim
  ];
}

Forking usage guide

Update the flake like any other nix flake update

Extra runtime dependancies can be added here

Add/remove plugins through /plugins/nvfetcher.toml

Use nvfetcher to update the list.

All plugins added will be fetched and installed.

All lua configuration is done in the /lua directory, and imported and ordered through /lua/default.nix.

Inspiration

About

Fork with an edit to how plugins are wrapped.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages