refactor(nvim): move custom plugins to an overlay

This commit is contained in:
Oliver Davies 2023-03-22 23:21:57 +00:00
parent 6771dd33d4
commit 8a22a861d4
4 changed files with 87 additions and 72 deletions

View file

@ -1,5 +1,8 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
let
nixpkgs = import ../shared/nixpkgs.nix { };
in
{
imports = [
../../home-manager/modules/common.nix
@ -9,6 +12,8 @@
../../home-manager/modules/zsh.nix
];
nixpkgs = nixpkgs;
fonts.fontconfig.enable = true;
home.packages = with pkgs; [

View file

@ -0,0 +1,7 @@
{ }: {
config = {
allowUnfree = true;
};
overlays = [ (import ./overlays.nix) ];
}

View file

@ -0,0 +1,73 @@
self: super: {
customVim = with self; {
vim-astro = pkgs.vimUtils.buildVimPlugin {
name = "vim-astro";
src = pkgs.fetchFromGitHub {
owner = "wuelnerdotexe";
repo = "vim-astro";
rev = "main";
sha256 = "HyQ4i/T1uQmGurBqCpo8+ESVSVPsTrLQBxLe2OEYjcY=";
};
};
vim-heritage = pkgs.vimUtils.buildVimPlugin {
name = "vim-heritage";
src = pkgs.fetchFromGitHub {
owner = "jessarcher";
repo = "vim-heritage";
rev = "cffa05c78c0991c998adc4504d761b3068547db6";
sha256 = "Lebe5V1XFxn4kSZ+ImZ69Vst9Nbc0N7eA9IzOCijFS0=";
};
};
vim-just = pkgs.vimUtils.buildVimPlugin {
name = "vim-just";
src = pkgs.fetchFromGitHub {
owner = "NoahTheDuke";
repo = "vim-just";
rev = "838c9096d4c5d64d1000a6442a358746324c2123";
sha256 = "51b8PxyKqBdeIvmmZyF2hpMBjkyrlZDdTB1opr5JZ7Y=";
};
};
vim-textobj-xmlattr = pkgs.vimUtils.buildVimPlugin {
name = "vim-textobj-xmlattr";
src = pkgs.fetchFromGitHub {
owner = "whatyouhide";
repo = "vim-textobj-xmlattr";
rev = "694a297f1d75fd527e87da9769f3c6519a87ebb1";
sha256 = "+91FVP95oh00flINdltqx6qJuijYo56tHIh3J098G2Q=";
};
};
tabline-vim = pkgs.vimUtils.buildVimPlugin {
name = "tabline-vim";
src = pkgs.fetchFromGitHub {
owner = "mkitt";
repo = "tabline.vim";
rev = "69c9698a3240860adaba93615f44778a9ab724b4";
sha256 = "51b8PxyKqBdeIvmmZyF2hpMBjkyrlZDdTB1opr5JZ7Y=";
};
};
vim-caser = pkgs.vimUtils.buildVimPlugin {
name = "vim-caser";
src = pkgs.fetchFromGitHub {
owner = "arthurxavierx";
repo = "vim-caser";
rev = "master";
sha256 = "PXAY01O/cHvAdWx3V/pyWFeiV5qJGvLcAKhl5DQc0Ps=";
};
};
vim-visual-star-search = pkgs.vimUtils.buildVimPlugin {
name = "vim-visual-star-search";
src = pkgs.fetchFromGitHub {
owner = "nelstrom";
repo = "vim-visual-star-search";
rev = "37259722f45996733fd309add61385a4ad88bdb9";
sha256 = "n8jd6fy30XukZ9NFZX5qclSlMfziP/Ew9dXfkysRl4Y=";
};
};
};
}

View file

@ -14,77 +14,7 @@ in {
enable = true;
package = pkgs.neovim-nightly;
plugins = let
customVim.vim-astro = pkgs.vimUtils.buildVimPlugin {
name = "vim-astro";
src = pkgs.fetchFromGitHub {
owner = "wuelnerdotexe";
repo = "vim-astro";
rev = "main";
sha256 = "HyQ4i/T1uQmGurBqCpo8+ESVSVPsTrLQBxLe2OEYjcY=";
};
};
customVim.vim-heritage = pkgs.vimUtils.buildVimPlugin {
name = "vim-heritage";
src = pkgs.fetchFromGitHub {
owner = "jessarcher";
repo = "vim-heritage";
rev = "cffa05c78c0991c998adc4504d761b3068547db6";
sha256 = "Lebe5V1XFxn4kSZ+ImZ69Vst9Nbc0N7eA9IzOCijFS0=";
};
};
customVim.vim-just = pkgs.vimUtils.buildVimPlugin {
name = "vim-just";
src = pkgs.fetchFromGitHub {
owner = "NoahTheDuke";
repo = "vim-just";
rev = "838c9096d4c5d64d1000a6442a358746324c2123";
sha256 = "51b8PxyKqBdeIvmmZyF2hpMBjkyrlZDdTB1opr5JZ7Y=";
};
};
customVim.vim-textobj-xmlattr = pkgs.vimUtils.buildVimPlugin {
name = "vim-textobj-xmlattr";
src = pkgs.fetchFromGitHub {
owner = "whatyouhide";
repo = "vim-textobj-xmlattr";
rev = "694a297f1d75fd527e87da9769f3c6519a87ebb1";
sha256 = "+91FVP95oh00flINdltqx6qJuijYo56tHIh3J098G2Q=";
};
};
customVim.tabline-vim = pkgs.vimUtils.buildVimPlugin {
name = "tabline-vim";
src = pkgs.fetchFromGitHub {
owner = "mkitt";
repo = "tabline.vim";
rev = "69c9698a3240860adaba93615f44778a9ab724b4";
sha256 = "51b8PxyKqBdeIvmmZyF2hpMBjkyrlZDdTB1opr5JZ7Y=";
};
};
customVim.vim-caser = pkgs.vimUtils.buildVimPlugin {
name = "vim-caser";
src = pkgs.fetchFromGitHub {
owner = "arthurxavierx";
repo = "vim-caser";
rev = "master";
sha256 = "PXAY01O/cHvAdWx3V/pyWFeiV5qJGvLcAKhl5DQc0Ps=";
};
};
customVim.vim-visual-star-search = pkgs.vimUtils.buildVimPlugin {
name = "vim-visual-star-search";
src = pkgs.fetchFromGitHub {
owner = "nelstrom";
repo = "vim-visual-star-search";
rev = "37259722f45996733fd309add61385a4ad88bdb9";
sha256 = "n8jd6fy30XukZ9NFZX5qclSlMfziP/Ew9dXfkysRl4Y=";
};
};
in with pkgs; [
plugins = with pkgs; [
customVim.tabline-vim
customVim.vim-astro
customVim.vim-caser