-
-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathdevenv.nix
More file actions
66 lines (60 loc) · 1.54 KB
/
devenv.nix
File metadata and controls
66 lines (60 loc) · 1.54 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
{ pkgs, lib, config, inputs, ... }:
{
dotenv.enable = true;
packages = with pkgs; [
# build deps
gnumake
asciidoctor
# test deps
git
fossil
mercurial
];
languages.crystal = {
enable = true;
# The Crystal language configuration uses `crystalline` as LSP, but the
# nix package seems to be temporarily broken.
lsp.enable = false;
};
git-hooks.hooks = {
actionlint.enable = true;
ameba = {
enable = true;
name = "Ameba";
entry = "${pkgs.ameba}/bin/ameba --fix";
files = "\\.cr$";
excludes = ["^lib/"];
pass_filenames = true;
};
check-toml.enable = true;
check-vcs-permalinks.enable = true;
circleci.enable = true;
crystal.enable = true;
makefile_both = {
enable = true;
name = "Change both Makefile and Makefile.win";
entry = ''${pkgs.runtimeShell} -c 'test "$#" -ne 1 || (echo "Changes only in $@" && false)' --'';
files = "^Makefile(\.win)?$";
pass_filenames = true;
};
markdownlint.enable = true;
shellcheck = {
enable = true;
excludes = [
".*\.zsh$"
];
};
typos.enable = true;
zizmor.enable = true;
};
profiles = {
lint.module = {
# More expensive hooks that we don't want to execute on every commit all the time
git-hooks.hooks = {
# reuse always runs on all files in the repo which takes some time.
# Violations are very rare, so a longer feedback loop doesn't matter much.
reuse.enable = true;
};
};
};
}