-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
devenv.nix
60 lines (50 loc) · 1.1 KB
/
devenv.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
{ pkgs, lib, config, inputs, ... }:
{
# https://devenv.sh/packages/
packages = [
pkgs.git
pkgs.templ
] ++ lib.optionals (!config.container.isBuilding) [
pkgs.flyctl
pkgs.nil
];
# https://devenv.sh/languages/
# languages.rust.enable = true;
languages.go.enable = true;
languages.go.enableHardeningWorkaround = true;
languages.javascript = {
enable = true;
bun = {
enable = true;
install.enable = true;
};
};
services.mailhog.enable = true;
services.minio.enable = true;
services.minio.buckets = [
"wga"
];
enterShell = ''
bun --version
git --version
go version
'';
scripts.generate-templates.exec = "templ generate";
scripts.tidy-modules.exec = "go mod tidy";
scripts.tidy.exec = ''
devenv shell generate-templates
devenv shell tidy-modules
'';
pre-commit.hooks = {
govet = {
enable = true;
pass_filenames = false;
};
gotest.enable = true;
golangci-lint = {
enable = true;
pass_filenames = false;
};
};
# See full reference at https://devenv.sh/reference/options/
}