Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
executable file
·125 lines (113 loc) · 3.2 KB
/
Copy pathflake.nix
File metadata and controls
executable file
·125 lines (113 loc) · 3.2 KB
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
{
description = "Vijay's Neovim (vjvim) Configuration";
nixConfig = {
extra-substituters = [
"https://cache.vjlab.dev?priority=1"
"https://nix-community.cachix.org?priority=2"
"https://cache.nixos.org?priority=3"
];
extra-trusted-public-keys = [
"cache.vjlab.dev-1:06uruRidWNTTjXEq5/yBE/kmIv46S8pD/lK+JFlrjGk="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
plugin-hlchunk-nvim = {
url = "github:shellRaining/hlchunk.nvim";
flake = false;
};
plugin-snipe-nvim = {
url = "github:leath-dub/snipe.nvim";
flake = false;
};
plugin-suda-vim = {
url = "github:lambdalisue/vim-suda";
flake = false;
};
plugin-visual-surround-nvim = {
url = "github:NStefan002/visual-surround.nvim";
flake = false;
};
};
outputs = {
nixvim,
flake-parts,
pre-commit-hooks,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
];
perSystem = {
system,
pkgs,
self',
...
}: let
nixvim' = nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule {
inherit pkgs;
module = ./config;
extraSpecialArgs = {
inherit inputs;
};
};
in {
packages = {
default = nvim;
vjvim = pkgs.writeShellScriptBin "vjvim" ''exec ${nvim}/bin/nvim "$@"'';
};
formatter = pkgs.alejandra;
devShells = {
default = with pkgs;
mkShell {
inherit (self'.checks.pre-commit-check) shellHook;
buildInputs = [self'.packages.vjvim] ++ self'.checks.pre-commit-check.enabledPackages;
};
};
checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
alejandra.enable = true;
actionlint.enable = true;
shellcheck.enable = true;
flake-checker.enable = true;
check-symlinks.enable = true;
end-of-file-fixer.enable = true;
detect-private-keys.enable = true;
trim-trailing-whitespace.enable = true;
trim-trailing-whitespace.stages = ["pre-commit"];
deadnix = {
enable = true;
settings = {
edit = true;
noLambdaArg = true;
};
};
statix = {
enable = true;
settings = {
ignore = [".envrc"];
};
};
};
};
};
};
};
}