-
Notifications
You must be signed in to change notification settings - Fork 3
/
shell.nix
50 lines (50 loc) · 991 Bytes
/
shell.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
{
pkgs ? import <nixpkgs> { },
inputs,
system,
}:
with pkgs;
let
preCommitHook =
(inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
editorconfig-checker.enable = true;
black.enable = true;
prettier.enable = true;
shellcheck.enable = true;
shfmt.enable = true;
# yamllint.enable = true;
actionlint.enable = true;
nixfmt = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
deadnix = {
enable = true;
settings = {
edit = true;
};
};
# statix.enable = true;
# convco.enable = true;
fourmolu.enable = true;
typos = {
enable = true;
types = [ "text" ];
};
};
}).shellHook;
in
mkShell {
buildInputs = [
git
gnupg
just
nix-zsh-completions
];
shellHook = ''
export DOTFILES="$(pwd)"
${preCommitHook}
'';
}