-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
517 lines (452 loc) · 11.7 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
{
description = "Neovim config";
inputs = {
rustaceanvim-src = {
url = "github:mrcjkb/rustaceanvim";
flake = false;
};
gitlinker-nvim-src = {
url = "github:linrongbin16/gitlinker.nvim";
flake = false;
};
ferris-nvim-src = {
url = "github:vxpm/ferris.nvim";
flake = false;
};
molten-nvim-src = {
url = "github:benlubas/molten-nvim";
flake = false;
};
typst-vim-src = {
url = "github:kaarmu/typst.vim";
flake = false;
};
nixpkgs.url = "github:NixOS/nixpkgs/master";
flake-utils.url = "github:numtide/flake-utils";
cornelis.url = "github:isovector/cornelis";
vim-circom-syntax-src = {
url = "github:iden3/vim-circom-syntax";
flake = false;
};
vim-illuminate-src = {
url = "github:RRethy/vim-illuminate";
flake = false;
};
terraform-ls-src = {
url = "github:hashicorp/terraform-ls";
flake = false;
};
conjure-src = {
url = "github:Olical/conjure";
flake = false;
};
nil = {
url = "github:oxalica/nil";
};
plenary-nvim-src = {
url = "github:nvim-lua/plenary.nvim";
flake = false;
};
telescope-src = {
url = "github:nvim-telescope/telescope.nvim";
flake = false;
};
lsp-config-src = {
url = "github:neovim/nvim-lspconfig";
flake = false;
};
wilder-nvim-src = {
url = "github:gelguy/wilder.nvim";
flake = false;
};
dracula-nvim = {
url = "github:Mofiqul/dracula.nvim";
flake = false;
};
gruvbox-nvim-src = {
url = "github:ellisonleao/gruvbox.nvim";
flake = false;
};
nvim-cmp = {
url = "github:hrsh7th/nvim-cmp";
flake = false;
};
cmp-nvim-lsp = {
url = "github:hrsh7th/cmp-nvim-lsp";
flake = false;
};
cmp-buffer = {
url = "github:hrsh7th/cmp-buffer";
flake = false;
};
comment-nvim-src = {
url = "github:numToStr/Comment.nvim";
flake = false;
};
blamer-nvim-src = {
url = "github:APZelos/blamer.nvim";
flake = false;
};
telescope-ui-select-src = {
url = "github:nvim-telescope/telescope-ui-select.nvim";
flake = false;
};
fidget-src = {
url = "github:j-hui/fidget.nvim/legacy";
flake = false;
};
neogen-src = {
url = "github:danymat/neogen";
flake = false;
};
which-key-src = {
url = "github:folke/which-key.nvim?ref=bd4411a2ed4dd8bb69c125e339d837028a6eea71";
flake = false;
};
conceal-src = {
url = "github:ticki/rust-cute-vim";
flake = false;
};
colorizer-src = {
url = "github:powerman/vim-plugin-AnsiEsc";
flake = false;
};
guess-indent-src = {
url = "github:NMAC427/guess-indent.nvim";
flake = false;
};
leap-src = {
url = "github:ggandor/leap.nvim";
flake = false;
};
nvim-autopairs-src = {
url = "github:windwp/nvim-autopairs";
flake = false;
};
nvim-ufo-src = {
url = "github:kevinhwang91/nvim-ufo";
flake = false;
};
nvim-async-src = {
url = "github:kevinhwang91/promise-async";
flake = false;
};
# lsp_lines-src = {
# url = "git+https://git.sr.ht/~whynothugo/lsp_lines.nvim";
# flake = false;
# };
markid-src = {
url = "github:David-Kunz/markid";
flake = false;
};
copilot-lua-src = {
url = "github:zbirenbaum/copilot.lua";
flake = false;
};
copilot-cmp-src = {
url = "github:zbirenbaum/copilot-cmp";
flake = false;
};
# copilot-vim-src = {
# url = "github:github/copilot.vim";
# flake = false;
# };
#
neural-src = {
url = "github:dense-analysis/neural";
flake = false;
};
nui-nvim-src = {
url = "github:muniftanjim/nui.nvim";
flake = false;
};
significant-nvim-src = {
url = "github:elpiloto/significant.nvim";
flake = false;
};
# chatgpt-nvim-src = {
# url = "github:jackMort/ChatGPT.nvim";
# flake = false;
# };
nvim-dap-src = {
url = "github:mfussenegger/nvim-dap";
flake = false;
};
nvim-dap-ui-src = {
url = "github:rcarriga/nvim-dap-ui";
flake = false;
};
nvim-dap-virtual-text-src = {
url = "github:theHamsta/nvim-dap-virtual-text";
flake = false;
};
telescope-dap-nvim-src = {
url = "github:nvim-telescope/telescope-dap.nvim";
flake = false;
};
cmp-dap-src = {
url = "github:rcarriga/cmp-dap";
flake = false;
};
# coq-lsp = {
# url = "github:r-muhairi/coq-lsp?ref=48bfb06558816861ca049b771b93f761e5e27fba&submodules=1";
# flake = true;
# };
node-type-nvim-src = {
url = "github:roobert/node-type.nvim";
flake = false;
};
floating-input-src = {
url = "github:liangxianzhe/floating-input.nvim";
flake = false;
};
ts-node-action-src = {
url = "github:CKolkey/ts-node-action";
flake = false;
};
nvim-trailblazer-src = {
url = "github:LeonHeidelbach/trailblazer.nvim";
flake = false;
};
nvim-treesitter-src = {
url = "github:nvim-treesitter/nvim-treesitter";
flake = false;
};
nvim-matchup-src = {
url = "github:andymass/vim-matchup";
flake = false;
};
quick-scope-src = {
url = "github:unblevable/quick-scope";
flake = false;
};
telescope-dapzzzz-src = {
url = "github:HUAHUAI23/telescope-dapzzzz";
flake = false;
};
yazi-nvim-src = {
url = "github:mikavilpas/yazi.nvim";
flake = false;
};
evangelion-nvim-src = {
url = "github:xero/evangelion.nvim";
flake = false;
};
nvim-colorizer-src = {
url = "github:norcalli/nvim-colorizer.lua";
flake = false;
};
nvim-presence-src = {
url = "github:andweeb/presence.nvim";
flake = false;
};
nvim-tagbar-src = {
url = "github:preservim/tagbar";
flake = false;
};
nvim-obsidian-src = {
url = "github:epwalsh/obsidian.nvim";
flake = false;
};
nvim-glow-src = {
url = "github:ellisonleao/glow.nvim";
flake = false;
};
nvim-godbolt-src = {
url = "github:p00f/godbolt.nvim";
flake = false;
};
nvim-surround-src = {
url = "github:kylechui/nvim-surround";
flake = false;
};
nvim-pylsp-src = {
url = "github:python-lsp/python-lsp-server";
flake = false;
};
nvim-pyright-src = {
url = "github:microsoft/pyright";
flake = false;
};
nvim-typos-lsp-src = {
url = "github:tekumara/typos-lsp";
flake = false;
};
nvim-tokyonight-src = {
url = "github:folke/tokyonight.nvim";
flake = false;
};
nvim-startup-src = {
url = "github:algoatson/startup.nvim";
flake = false;
};
nvim-oil-src = {
url = "github:stevearc/oil.nvim";
flake = false;
};
nvim-bufferline-src = {
url = "github:akinsho/bufferline.nvim";
flake = false;
};
nvim-diffview-src = {
url = "github:sindrets/diffview.nvim";
flake = false;
};
nvim-lightbulb-src = {
url = "github:kosayoda/nvim-lightbulb";
flake = false;
};
# nvim-nixd-src = {
# url = "github:nix-community/nixd";
# flake = true;
# };
#
# nvim-nil-src = {
# url = "github:oxalica/nil";
# flake = true;
# };
};
outputs = inputs@{ self, flake-utils, nixpkgs, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs {
inherit system;
overlays = [
(import ./plugins.nix inputs)
(prev: final: { })
];
});
pluginList = with pkgs; [
# essentials
which-key
nvim-oil
nvim-bufferline
nvim-diffview
nvim-lightbulb
# aesthetics
gruvbox-nvim
evangelion-nvim
vimPlugins.lualine-nvim
vimPlugins.tabline-nvim
vimPlugins.nvim-web-devicons
nvim-tokyonight
nvim-startup
# telescope
telescope-nvim
vimPlugins.telescope-file-browser-nvim
telescope-ui-select
yazi-nvim
# github
gitlinker-nvim
# misc
vimPlugins.surround-nvim
vimPlugins.undotree
parinfer-rust-nvim
colorizer # colorize ANSI escape codes.
nvim-colorizer # colorize html color codes.
nvim-presence
nvim-obsidian
nvim-glow
nvim-godbolt
nvim-surround
neogen
# git
vimPlugins.neogit
blamer-nvim
vimPlugins.gitsigns-nvim
# autopairs
nvim-autopairs
# lsp
vimPlugins.nvim-nio # async-io
vimPlugins.rust-vim # for formatting
vimPlugins.image-nvim
vimPlugins.typescript-tools-nvim
typst-vim
vimPlugins.vim-ormolu # haskell
vimPlugins.haskell-tools-nvim # haskell
cmp-nvim-lsp # completion
nvim-cmp # completion
vimPlugins.cmp-vsnip # completion
cmp-buffer # completion
vimPlugins.lsp_signature-nvim
vimPlugins.lspkind-nvim
lsp-config
plenary-nvim
vimPlugins.popup-nvim
vimPlugins.vim-vsnip
vimPlugins.vim-vsnip-integ
vimPlugins.friendly-snippets
ferris-nvim
rustaceanvim
vimPlugins.crates-nvim
fidget
vimPlugins.trouble-nvim
copilot-lua
copilot-cmp
node-type-nvim
floating-input
nvim-tagbar
typos-lsp
pyright
nvim-pylsp
nvim-pyright
# nvim-nixd
# nvim-nil
# treesitter
nvim-async
nvim-ufo
comment-nvim
vimPlugins.nvim-treesitter-context
vimPlugins.nvim-treesitter-textobjects
((pkgs.vimPlugins.nvim-treesitter.overrideAttrs (oldAttrs: {
src = pkgs.nvim-treesitter-src;
}) ).withAllGrammars)
vimPlugins.nvim-ts-autotag
vimPlugins.rainbow-delimiters-nvim
vim-illuminate
markid
ts-node-action
];
luaModules = [
"essentials"
"aesthetics"
"telescope"
"github"
"misc"
"treesitter"
"git"
"autopairs"
"lsp"
"obsidian"
];
luaRequire = module: builtins.readFile (builtins.toString ./lua_modules + "/${module}.lua");
pluginAttrSet = map (x: { plugin = x; }) pluginList;
orig_config = pkgs.neovimUtils.makeNeovimConfig {
withNodeJs = true;
withRuby = true;
withPython3 = true;
plugins = pluginAttrSet;
};
config = orig_config
// {
luaRcContent =
builtins.concatStringsSep "\n" (map luaRequire luaModules)
;
wrapperArgs = ["--suffix" "PATH" ":" "${pkgs.lib.makeBinPath /* great place for pipe operator */ (with pkgs;[ ripgrep git terraform-ls lua-language-server clang-tools myRSetup nodejs nodePackages.vscode-json-languageserver ripgrep fd])}"];
};
myNeovim =
pkgs.wrapNeovimUnstable
(pkgs.neovim-unwrapped.overrideAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ (with pkgs; [ tree-sitter ]);
}))
config;
in
{
defaultPackage = myNeovim;
apps.defaultApp = {
type = "app";
program = "${myNeovim}/bin/nvim";
};
packages.neovim = myNeovim;
});
}