blob: 3bb86b49cefce32cf227f7f6d7b8882984e106f6 (
plain)
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
|
{
description = "getchoo's neovim config";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
neovim = {
url = "github:neovim/neovim?dir=contrib";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "utils";
};
neovim-nix = {
url = "github:willruggiano/neovim.nix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "parts";
pre-commit-nix.follows = "pre-commit";
neovim.follows = "neovim";
};
};
pre-commit = {
url = "github:cachix/pre-commit-hooks.nix";
inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs";
flake-utils.follows = "utils";
};
};
# this is to prevent multiple versions in lockfile
utils.url = "github:numtide/flake-utils";
};
outputs = {parts, ...} @ inputs:
parts.lib.mkFlake {inherit inputs;} {
imports = [
inputs.pre-commit.flakeModule
inputs.neovim-nix.flakeModule
./neovim.nix
];
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem = {
pkgs,
config,
self',
...
}: {
packages = {
getchvim = config.neovim.final;
default = self'.packages.getchvim;
};
devShells.default = pkgs.mkShell {
shellHook = config.pre-commit.installationScript;
packages = with pkgs; [
actionlint
self'.formatter
deadnix
nil
statix
stylua
];
};
formatter = pkgs.alejandra;
pre-commit.settings.hooks = {
actionlint.enable = true;
alejandra.enable = true;
deadnix.enable = true;
nil.enable = true;
statix.enable = true;
stylua.enable = true;
};
};
};
}
|