flake.nix 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {
  2. description = "Neovim configuration";
  3. inputs = {
  4. neovim-flake.url = "github:neovim/neovim?dir=contrib";
  5. neovim-flake.inputs.nixpkgs.follows = "nixpkgs";
  6. };
  7. outputs = { self, nixpkgs, neovim-flake }: {
  8. overlay = final: prev: {
  9. neovim-unwrapped = neovim-flake.packages.${prev.system}.neovim;
  10. };
  11. packages.x86_64-linux.default =
  12. with import nixpkgs {
  13. system = "x86_64-linux";
  14. overlays = [ self.overlay ];
  15. };
  16. let
  17. extraPath = [
  18. fd
  19. ripgrep
  20. nodePackages.typescript-language-server
  21. nodePackages.eslint_d
  22. ];
  23. in
  24. neovim.override {
  25. extraMakeWrapperArgs = "--prefix PATH : ${lib.makeBinPath extraPath}";
  26. configure = {
  27. customRC = ''
  28. source ${./settings.lua}
  29. source ${./plugins.lua}
  30. source ${./mappings.lua}
  31. source ${./autocmd.lua}
  32. source ${./lsp.lua}
  33. source ${./theme.lua}
  34. '';
  35. packages.myVimPackage = with vimPlugins; {
  36. start = [
  37. vim-sensible
  38. vim-sleuth
  39. vim-fugitive
  40. vim-surround
  41. vim-abolish
  42. undotree
  43. telescope-nvim
  44. telescope-fzf-native-nvim
  45. mini-nvim
  46. gitsigns-nvim
  47. sonokai
  48. (nvim-treesitter.withPlugins (p: with p; [
  49. tree-sitter-css
  50. tree-sitter-go
  51. tree-sitter-javascript
  52. tree-sitter-json
  53. tree-sitter-lua
  54. tree-sitter-nix
  55. tree-sitter-ruby
  56. tree-sitter-tsx
  57. tree-sitter-typescript
  58. ]))
  59. nvim-lspconfig
  60. nvim-lsp-ts-utils
  61. null-ls-nvim
  62. fidget-nvim
  63. ];
  64. };
  65. };
  66. };
  67. };
  68. }