-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.nix
82 lines (80 loc) · 1.56 KB
/
config.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
{ plugins
, pkgs
,
}:
let
lib = pkgs.lib;
stdenv = pkgs.stdenv;
vimPlugins = pkgs.vimPlugins;
envVars = plugins // {
treesitter_parsers =
lib.pipe
(vimPlugins.nvim-treesitter.withPlugins (
p: with p; [
astro
bash
c
comment
cpp
css
dockerfile
go
gomod
graphql
haskell
html
javascript
jsdoc
json
jsonc
lua
make
markdown
markdown_inline # lspsaga.nvim require this
nix
prisma
python
rust
scss
sql
toml
tsx
typescript
vim
yaml
yuck
zig
]
)).dependencies
[
(builtins.map builtins.toString)
(builtins.concatStringsSep ",")
];
};
preprocessed = stdenv.mkDerivation (
envVars
// {
pname = "turtton-nvim-config";
version = "latest";
src = ./nvim;
installPhase = ''
mkdir -p $out
for file in $(find . -type f); do
substituteAllInPlace "$file"
done
cp -r ./ $out
'';
}
);
in
stdenv.mkDerivation {
name = "turtton-nvim-config";
version = "latest";
src = preprocessed;
turtton_nvim_config_path = preprocessed;
installPhase = ''
mkdir -p $out
substituteAllInPlace ./lua/init.lua
cp -r ./ $out
'';
}