88 lines
2.3 KiB
Nix
88 lines
2.3 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
|
|
nvim-tree-lua = {
|
|
url = "github:kyazdani42/nvim-tree.lua?rev=0417d9148b6546bf4883b6e9750f992f980afbfe";
|
|
flake = false;
|
|
};
|
|
|
|
tabby-nvim = {
|
|
url = "github:nanozuki/tabby.nvim?rev=916c9e56d043906a441cd9f905e2ca1f5c4dddb0";
|
|
flake = false;
|
|
};
|
|
|
|
editorconfig-nvim = {
|
|
url = "github:gpanders/editorconfig.nvim?rev=7d10fe6bc340fd783c0b61cf627dd235100284db";
|
|
flake = false;
|
|
};
|
|
|
|
telescope-live-grep-args-nvim = {
|
|
url = "github:nvim-telescope/telescope-live-grep-args.nvim?rev=32b633b062d1168a2d18ad27994e5b4ef97f0a74";
|
|
flake = false;
|
|
};
|
|
|
|
lspsaga-nvim = {
|
|
url = "github:glepnir/lspsaga.nvim?rev=c2ef0115fb917460daf5c76fe3ad3a9357213b54";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs = inputs @ { self, nixpkgs, utils, ... }:
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
inputPlugins = [
|
|
"nvim-tree-lua"
|
|
"tabby-nvim"
|
|
"editorconfig-nvim"
|
|
"telescope-live-grep-args-nvim"
|
|
"lspsaga-nvim"
|
|
];
|
|
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
(f: p:
|
|
let
|
|
inherit (p.lib) listToAttrs nameValuePair;
|
|
|
|
buildPlugin = name: p.vimUtils.buildVimPluginFrom2Nix {
|
|
name = name;
|
|
src = builtins.getAttr name inputs;
|
|
};
|
|
|
|
buildPluginValuePair = n: nameValuePair n (buildPlugin n);
|
|
|
|
customPlugins = listToAttrs (builtins.map buildPluginValuePair inputPlugins);
|
|
in
|
|
{ vimPlugins = p.vimPlugins // customPlugins; }
|
|
)
|
|
];
|
|
};
|
|
|
|
neovim = pkgs.callPackage ./. { };
|
|
in
|
|
{
|
|
apps.default = {
|
|
type = "app";
|
|
program = "${neovim}/bin/nvim";
|
|
};
|
|
|
|
packages.default = neovim;
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
packages = [
|
|
(neovim.override {
|
|
enableDevIcons = true;
|
|
enableTabby = true;
|
|
})
|
|
pkgs.stylua # lua formatter
|
|
];
|
|
};
|
|
|
|
overlays = f: p: {
|
|
myneovim = neovim;
|
|
};
|
|
});
|
|
}
|