Created
October 17, 2023 12:39
-
-
Save mrcjkb/54f75261bf9110b43230ea55692c9088 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/README.md b/README.md | |
index f417619..ce8ebf2 100644 | |
--- a/README.md | |
+++ b/README.md | |
@@ -85,6 +85,14 @@ nixpkgs.overlays = [ | |
]; | |
``` | |
+You can then add the overlay's output(s) to the `systemPackages`: | |
+ | |
+```nix | |
+environment.systemPackages = with pkgs; [ | |
+ nvim-pkg # The default package added by the overlay | |
+]; | |
+``` | |
+ | |
### Non-NixOS | |
With Nix installed (flakes enabled), from the repo root: | |
diff --git a/flake.lock b/flake.lock | |
index 32fef2b..0ac13a8 100644 | |
--- a/flake.lock | |
+++ b/flake.lock | |
@@ -20,11 +20,11 @@ | |
}, | |
"nixpkgs": { | |
"locked": { | |
- "lastModified": 1696193975, | |
- "narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=", | |
+ "lastModified": 1697059129, | |
+ "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=", | |
"owner": "NixOS", | |
"repo": "nixpkgs", | |
- "rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242", | |
+ "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593", | |
"type": "github" | |
}, | |
"original": { | |
@@ -59,11 +59,11 @@ | |
"wf-nvim": { | |
"flake": false, | |
"locked": { | |
- "lastModified": 1694084982, | |
- "narHash": "sha256-C5y171FySVSZ6iGE1lDBR/l6gly9PiY9EKy4CVEfqY4=", | |
+ "lastModified": 1697380700, | |
+ "narHash": "sha256-TS5lokzRO+/nK0EmiW5f4qEBQLl/3e2GsNIuway6iKE=", | |
"owner": "Cassin01", | |
"repo": "wf.nvim", | |
- "rev": "d7de32119e933ddd4c006324475d487c87b8d80b", | |
+ "rev": "6258254a2528fff9e4180d6fa5a0ea9e1d6784f5", | |
"type": "github" | |
}, | |
"original": { | |
diff --git a/flake.nix b/flake.nix | |
index 66834f4..7e496e0 100644 | |
--- a/flake.nix | |
+++ b/flake.nix | |
@@ -26,16 +26,13 @@ | |
"aarch64-darwin" | |
]; | |
- # This is where the bleeding-edge plugins are built. | |
- plugin-overlay = import ./nix/plugin-overlay.nix {inherit inputs;}; | |
# This is where the Neovim derivation is built. | |
- neovim-overlay = import ./nix/neovim-overlay.nix; | |
+ neovim-overlay = import ./nix/neovim-overlay.nix {inherit inputs;}; | |
in | |
flake-utils.lib.eachSystem supportedSystems (system: let | |
pkgs = import nixpkgs { | |
inherit system; | |
overlays = [ | |
- plugin-overlay | |
neovim-overlay | |
]; | |
}; | |
diff --git a/nix/neovim-overlay.nix b/nix/neovim-overlay.nix | |
index 4f9972c..fe6cbdd 100644 | |
--- a/nix/neovim-overlay.nix | |
+++ b/nix/neovim-overlay.nix | |
@@ -1,73 +1,77 @@ | |
-final: prev: | |
+{inputs}: final: prev: | |
with final.pkgs.lib; let | |
- pkgs = final.pkgs; | |
+ pkgs = final; | |
+ | |
+ # Use this to create a plugin from an input | |
+ mkNvimPlugin = src: pname: | |
+ pkgs.vimUtils.buildVimPlugin { | |
+ inherit pname src; | |
+ version = src.lastModifiedDate; | |
+ }; | |
mkNeovim = pkgs.callPackage ./mkNeovim.nix {}; | |
- all-plugins = | |
- with pkgs.vimPlugins; [ | |
- # plugins from nixpkgs go in here. | |
- # https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=vimPlugins | |
- nvim-treesitter.withAllGrammars | |
- luasnip # snippets | https://github.com/l3mon4d3/luasnip/ | |
- # nvim-cmp (autocompletion) and extensions | |
- nvim-cmp # https://github.com/hrsh7th/nvim-cmp | |
- cmp_luasnip # snippets autocompletion extension for nvim-cmp | https://github.com/saadparwaiz1/cmp_luasnip/ | |
- lspkind-nvim # vscode-like LSP pictograms | https://github.com/onsails/lspkind.nvim/ | |
- cmp-nvim-lsp # LSP as completion source | https://github.com/hrsh7th/cmp-nvim-lsp/ | |
- cmp-nvim-lsp-signature-help # https://github.com/hrsh7th/cmp-nvim-lsp-signature-help/ | |
- cmp-buffer # current buffer as completion source | https://github.com/hrsh7th/cmp-buffer/ | |
- cmp-path # file paths as completion source | https://github.com/hrsh7th/cmp-path/ | |
- cmp-nvim-lua # neovim lua API as completion source | https://github.com/hrsh7th/cmp-nvim-lua/ | |
- # ^ nvim-cmp extensions | |
- # git integration plugins | |
- diffview-nvim # https://github.com/sindrets/diffview.nvim/ | |
- neogit # https://github.com/TimUntersberger/neogit/ | |
- gitsigns-nvim # https://github.com/lewis6991/gitsigns.nvim/ | |
- vim-fugitive # https://github.com/tpope/vim-fugitive/ | |
- # ^ git integration plugins | |
- # telescope and extensions | |
- telescope-nvim # https://github.com/nvim-telescope/telescope.nvim/ | |
- telescope-fzy-native-nvim # https://github.com/nvim-telescope/telescope-fzy-native.nvim | |
- # telescope-smart-history-nvim # https://github.com/nvim-telescope/telescope-smart-history.nvim | |
- # ^ telescope and extensions | |
- # UI | |
- lualine-nvim # Status line | https://github.com/nvim-lualine/lualine.nvim/ | |
- nvim-navic # Add LSP location to lualine | https://github.com/SmiteshP/nvim-navic | |
- statuscol-nvim # Status column | https://github.com/luukvbaal/statuscol.nvim/ | |
- nvim-treesitter-context # nvim-treesitter-context | |
- # ^ UI | |
- # language support | |
- neodev-nvim # adds support for Neovim's Lua API to lua-language-server | https://github.com/folke/neodev.nvim/ | |
- # ^ language support | |
- # navigation/editing enhancement plugins | |
- vim-unimpaired # predefined ] and [ navigation keymaps | https://github.com/tpope/vim-unimpaired/ | |
- eyeliner-nvim # Highlights unique characters for f/F and t/T motions | https://github.com/jinh0/eyeliner.nvim | |
- nvim-surround # https://github.com/kylechui/nvim-surround/ | |
- nvim-treesitter-textobjects # https://github.com/nvim-treesitter/nvim-treesitter-textobjects/ | |
- nvim-ts-context-commentstring # https://github.com/joosepalviste/nvim-ts-context-commentstring/ | |
- # ^ navigation/editing enhancement plugins | |
- # Useful utilities | |
- nvim-unception # Prevent nested neovim sessions | nvim-unception | |
- # ^ Useful utilities | |
- # libraries that other plugins depend on | |
- sqlite-lua | |
- plenary-nvim | |
- nvim-web-devicons | |
- vim-repeat | |
- # ^ libraries that other plugins depend on | |
- ] | |
- ++ (with pkgs.nvimPlugins; [ | |
- # bleeding-edge plugins from flake inputs go in here | |
- wf-nvim # keymap hints | https://github.com/Cassin01/wf.nvim | |
- ]); | |
+ all-plugins = with pkgs.vimPlugins; [ | |
+ # plugins from nixpkgs go in here. | |
+ # https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=vimPlugins | |
+ nvim-treesitter.withAllGrammars | |
+ luasnip # snippets | https://github.com/l3mon4d3/luasnip/ | |
+ # nvim-cmp (autocompletion) and extensions | |
+ nvim-cmp # https://github.com/hrsh7th/nvim-cmp | |
+ cmp_luasnip # snippets autocompletion extension for nvim-cmp | https://github.com/saadparwaiz1/cmp_luasnip/ | |
+ lspkind-nvim # vscode-like LSP pictograms | https://github.com/onsails/lspkind.nvim/ | |
+ cmp-nvim-lsp # LSP as completion source | https://github.com/hrsh7th/cmp-nvim-lsp/ | |
+ cmp-nvim-lsp-signature-help # https://github.com/hrsh7th/cmp-nvim-lsp-signature-help/ | |
+ cmp-buffer # current buffer as completion source | https://github.com/hrsh7th/cmp-buffer/ | |
+ cmp-path # file paths as completion source | https://github.com/hrsh7th/cmp-path/ | |
+ cmp-nvim-lua # neovim lua API as completion source | https://github.com/hrsh7th/cmp-nvim-lua/ | |
+ # ^ nvim-cmp extensions | |
+ # git integration plugins | |
+ diffview-nvim # https://github.com/sindrets/diffview.nvim/ | |
+ neogit # https://github.com/TimUntersberger/neogit/ | |
+ gitsigns-nvim # https://github.com/lewis6991/gitsigns.nvim/ | |
+ vim-fugitive # https://github.com/tpope/vim-fugitive/ | |
+ # ^ git integration plugins | |
+ # telescope and extensions | |
+ telescope-nvim # https://github.com/nvim-telescope/telescope.nvim/ | |
+ telescope-fzy-native-nvim # https://github.com/nvim-telescope/telescope-fzy-native.nvim | |
+ # telescope-smart-history-nvim # https://github.com/nvim-telescope/telescope-smart-history.nvim | |
+ # ^ telescope and extensions | |
+ # UI | |
+ lualine-nvim # Status line | https://github.com/nvim-lualine/lualine.nvim/ | |
+ nvim-navic # Add LSP location to lualine | https://github.com/SmiteshP/nvim-navic | |
+ statuscol-nvim # Status column | https://github.com/luukvbaal/statuscol.nvim/ | |
+ nvim-treesitter-context # nvim-treesitter-context | |
+ # ^ UI | |
+ # language support | |
+ neodev-nvim # adds support for Neovim's Lua API to lua-language-server | https://github.com/folke/neodev.nvim/ | |
+ # ^ language support | |
+ # navigation/editing enhancement plugins | |
+ vim-unimpaired # predefined ] and [ navigation keymaps | https://github.com/tpope/vim-unimpaired/ | |
+ eyeliner-nvim # Highlights unique characters for f/F and t/T motions | https://github.com/jinh0/eyeliner.nvim | |
+ nvim-surround # https://github.com/kylechui/nvim-surround/ | |
+ nvim-treesitter-textobjects # https://github.com/nvim-treesitter/nvim-treesitter-textobjects/ | |
+ nvim-ts-context-commentstring # https://github.com/joosepalviste/nvim-ts-context-commentstring/ | |
+ # ^ navigation/editing enhancement plugins | |
+ # Useful utilities | |
+ nvim-unception # Prevent nested neovim sessions | nvim-unception | |
+ # ^ Useful utilities | |
+ # libraries that other plugins depend on | |
+ sqlite-lua | |
+ plenary-nvim | |
+ nvim-web-devicons | |
+ vim-repeat | |
+ # ^ libraries that other plugins depend on | |
+ # bleeding-edge plugins from flake inputs | |
+ (mkNvimPlugin inputs.wf-nvim "wf.nvim") # keymap hints | https://github.com/Cassin01/wf.nvim | |
+ # ^ bleeding-edge plugins from flake inputs | |
+ ]; | |
extraPackages = with pkgs; [ | |
# language servers, etc. | |
lua-language-server | |
nil # nix LSP | |
]; | |
- | |
in { | |
# This is the neovim derivation | |
# returned by the overlay | |
diff --git a/nix/plugin-overlay.nix b/nix/plugin-overlay.nix | |
deleted file mode 100644 | |
index ba755a6..0000000 | |
--- a/nix/plugin-overlay.nix | |
+++ /dev/null | |
@@ -1,12 +0,0 @@ | |
-{inputs}: final: prev: let | |
- mkNvimPlugin = src: pname: | |
- prev.pkgs.vimUtils.buildVimPlugin { | |
- inherit pname src; | |
- version = src.lastModifiedDate; | |
- }; | |
-in { | |
- nvimPlugins = { | |
- # Add bleeding edge plugins from the flake inputs here. | |
- wf-nvim = mkNvimPlugin inputs.wf-nvim "wf.nvim"; | |
- }; | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment