-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
103 lines (98 loc) · 2.66 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-config.url = "github:s3igo/dotfiles?dir=neovim-config";
};
outputs =
{
self,
nixpkgs,
systems,
nixvim,
neovim-config,
}:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = eachSystem (system: import nixpkgs { inherit system; });
in
{
packages = eachSystem (system: {
neovim = nixvim.legacyPackages.${system}.makeNixvim {
imports =
with neovim-config.nixosModules;
[
default
nix
typescript
json
yaml
markdown
]
++ [
{
plugins = {
nvim-colorizer.fileTypes = [
{
language = "astro";
tailwind = "lsp";
}
];
none-ls = {
enable = true;
sources = {
diagnostics.textlint = {
enable = true;
package = null;
};
formatting.textlint = {
enable = true;
package = null;
};
};
};
lsp.servers = {
astro.enable = true;
biome.enable = true;
taplo.enable = true;
tailwindcss = {
enable = true;
extraOptions.settings.tailwindCSS.classAttributes = [
"class"
"class:list"
".*Classes"
];
};
jsonls.onAttach.function = ''
client.server_capabilities.documentFormattingProvider = false
'';
};
};
}
];
};
});
devShells = eachSystem (
system:
let
pkgs = pkgsFor.${system};
in
{
default = pkgs.mkShellNoCC {
buildInputs = [
pkgs.nodejs-slim
pkgs.bun
(neovim-config.lib.customName {
inherit pkgs;
nvim = self.packages.${system}.neovim;
})
];
};
}
);
};
}