build(nvim): make build pure by not using fetchGit and changing paths
This commit is contained in:
parent
7634fab64f
commit
00f5f01253
1 changed files with 21 additions and 28 deletions
|
@ -1,21 +1,15 @@
|
||||||
# https://breuer.dev/blog/nixos-home-manager-neovim
|
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
configDir = "/home/matt/.nix/config";
|
|
||||||
|
|
||||||
# installs a vim plugin from git with a given tag / branch
|
# installs a vim plugin from git with a given tag / branch
|
||||||
pluginGit = ref: repo: pkgs.vimUtils.buildVimPluginFrom2Nix {
|
plugin = owner: repo: rev: hash: pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
pname = "${lib.strings.sanitizeDerivationName repo}";
|
pname = "${lib.strings.sanitizeDerivationName repo}";
|
||||||
version = ref;
|
version = rev;
|
||||||
src = builtins.fetchGit {
|
src = pkgs.fetchFromGitHub {
|
||||||
url = "https://github.com/${repo}.git";
|
inherit rev owner repo hash;
|
||||||
ref = ref;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in
|
||||||
# always installs latest version
|
{
|
||||||
plugin = pluginGit "HEAD";
|
|
||||||
in {
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"../.gradle/gradle.properties".source = pkgs.writeText "gradle.properties" ''
|
"../.gradle/gradle.properties".source = pkgs.writeText "gradle.properties" ''
|
||||||
org.gradle.java.home = ${pkgs.temurin-bin-17}
|
org.gradle.java.home = ${pkgs.temurin-bin-17}
|
||||||
|
@ -28,13 +22,13 @@ in {
|
||||||
# read in the vim config from filesystem
|
# read in the vim config from filesystem
|
||||||
# this enables syntaxhighlighting when editing those
|
# this enables syntaxhighlighting when editing those
|
||||||
extraConfig = builtins.concatStringsSep "\n" [
|
extraConfig = builtins.concatStringsSep "\n" [
|
||||||
(lib.strings.fileContents "${configDir}/nvim/base.vim")
|
(lib.strings.fileContents ../../config/nvim/base.vim)
|
||||||
# (lib.strings.fileContents ./.nvim/plugins.vim)
|
# (lib.strings.fileContents ./.nvim/plugins.vim)
|
||||||
# (lib.strings.fileContents ./.nvim/lsp.vim)
|
# (lib.strings.fileContents ./.nvim/lsp.vim)
|
||||||
''
|
''
|
||||||
lua << EOF
|
lua << EOF
|
||||||
${lib.strings.fileContents "${configDir}/nvim/config.lua"}
|
${lib.strings.fileContents ../../config/nvim/config.lua}
|
||||||
${lib.strings.fileContents "${configDir}/nvim/lsp.lua"}
|
${lib.strings.fileContents ../../config/nvim/lsp.lua}
|
||||||
EOF
|
EOF
|
||||||
''
|
''
|
||||||
];
|
];
|
||||||
|
@ -90,28 +84,27 @@ in {
|
||||||
coc-tsserver
|
coc-tsserver
|
||||||
|
|
||||||
coc-fzf
|
coc-fzf
|
||||||
(plugin "junegunn/fzf.vim")
|
fzfWrapper
|
||||||
(plugin "junegunn/fzf")
|
fzf-vim
|
||||||
|
|
||||||
nvim-treesitter.withAllGrammars
|
nvim-treesitter.withAllGrammars
|
||||||
nvim-treesitter
|
nvim-treesitter
|
||||||
nvim-autopairs
|
nvim-autopairs
|
||||||
|
|
||||||
(plugin "Mofiqul/dracula.nvim")
|
dracula-nvim
|
||||||
(plugin "lukas-reineke/indent-blankline.nvim")
|
(plugin "lukas-reineke"
|
||||||
(plugin "lewis6991/gitsigns.nvim")
|
"indent-blankline.nvim"
|
||||||
(plugin "nvim-lualine/lualine.nvim")
|
"1e79f3dd6e750c5cb4ce99d1755a3e17025c0f47"
|
||||||
|
"sha256-YhfMeA+bnXlGSZPNsK1rRls9iMXUlXYKVFjHwXlnE4E=")
|
||||||
|
gitsigns-nvim
|
||||||
|
lualine-nvim
|
||||||
|
nvim-scrollbar
|
||||||
|
|
||||||
# neo-tree and deps
|
neo-tree-nvim
|
||||||
(plugin "nvim-neo-tree/neo-tree.nvim")
|
|
||||||
(plugin "nvim-lua/plenary.nvim")
|
|
||||||
(plugin "nvim-tree/nvim-web-devicons")
|
|
||||||
(plugin "MunifTanjim/nui.nvim")
|
|
||||||
|
|
||||||
# to explore more
|
# to explore more
|
||||||
fugitive
|
fugitive
|
||||||
(plugin "folke/todo-comments.nvim")
|
todo-comments-nvim
|
||||||
(plugin "petertriho/nvim-scrollbar")
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue