This repository has been archived on 2024-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
neovim/flake.nix

74 lines
2 KiB
Nix
Raw Normal View History

2022-09-15 01:22:06 +03:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
2022-09-19 18:44:57 +03:00
tabby-nvim = {
url = "github:nanozuki/tabby.nvim?rev=916c9e56d043906a441cd9f905e2ca1f5c4dddb0";
flake = false;
};
2022-09-19 19:03:40 +03:00
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;
};
2022-09-15 01:22:06 +03:00
};
2022-09-19 18:44:57 +03:00
outputs = inputs @ { self, nixpkgs, utils, ... }:
2022-09-15 01:22:06 +03:00
utils.lib.eachDefaultSystem (system:
let
2022-09-19 18:44:57 +03:00
pkgs = import nixpkgs {
inherit system;
overlays = [
(f: p: {
vimPlugins = p.vimPlugins // {
# TODO: make util to build plugins from array
2022-09-19 18:44:57 +03:00
tabby-nvim = p.vimUtils.buildVimPluginFrom2Nix {
name = "tabby-nvim";
src = inputs.tabby-nvim;
};
2022-09-19 19:03:40 +03:00
editorconfig-nvim = p.vimUtils.buildVimPluginFrom2Nix {
name = "editorconfig-nvim";
src = inputs.editorconfig-nvim;
};
telescope-live-grep-args-nvim = p.vimUtils.buildVimPluginFrom2Nix {
name = "telescope-live-grep-args-nvim";
src = inputs.telescope-live-grep-args-nvim;
};
2022-09-19 18:44:57 +03:00
};
})
];
};
2022-09-15 01:22:06 +03:00
2022-09-15 01:29:25 +03:00
neovim = pkgs.callPackage ./. { };
2022-09-15 01:22:06 +03:00
in
{
2022-09-17 17:52:12 +03:00
apps.default = {
type = "app";
program = "${neovim}/bin/nvim";
};
packages.default = neovim;
2022-09-15 01:22:06 +03:00
devShells.default = pkgs.mkShell {
2022-09-16 23:42:53 +03:00
packages = [
2022-09-19 18:44:57 +03:00
(neovim.override {
enableDevIcons = true;
enableTabby = true;
})
2022-09-16 23:42:53 +03:00
pkgs.stylua # lua formatter
];
2022-09-15 01:22:06 +03:00
};
2022-09-17 17:52:12 +03:00
overlays = f: p: {
myneovim = neovim;
};
2022-09-15 01:22:06 +03:00
});
}