-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdevenv.nix
More file actions
107 lines (100 loc) · 2.32 KB
/
devenv.nix
File metadata and controls
107 lines (100 loc) · 2.32 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
{ pkgs, config, ... }:
{
name = "storm-software/storm-ops";
dotenv.enable = true;
dotenv.filename = [
".env"
".env.local"
];
dotenv.disableHint = true;
# https://devenv.sh/basics/
env.DEFAULT_LOCALE = "en_US";
env.DEFAULT_TIMEZONE = "America/New_York";
# https://devenv.sh/packages/
packages = with pkgs; [
cargo-deny
openssl
yamllint
];
# https://devenv.sh/languages/
languages.rust = {
enable = true;
toolchainFile = ./rust-toolchain.toml;
};
tasks = {
"storm:setup:git" = {
exec = ''
git config commit.gpgsign true
git config tag.gpgSign true
git config lfs.allowincompletepush true
git config init.defaultBranch main
npm config set provenance true
'';
before = [
"storm:setup:install"
"storm:setup:updates"
"devenv:enterShell"
"devenv:enterTest"
];
after = [
"devenv:files"
"devenv:files:cleanup"
];
};
"storm:setup:install" = {
exec = ''
pnpm install
bootstrap
'';
before = [
"storm:setup:updates"
"devenv:enterShell"
"devenv:enterTest"
];
after = [
"storm:setup:git"
"devenv:files"
"devenv:files:cleanup"
];
};
"storm:setup:updates" = {
exec = ''
pnpm update --recursive --workspace
update-storm
'';
before = [
"devenv:enterShell"
"devenv:enterTest"
];
after = [
"storm:setup:git"
"devenv:files"
"devenv:files:cleanup"
"storm:setup:install"
];
};
};
git-hooks = {
enable = true;
hooks = {
taplo = {
enable = true;
description = "Taplo with @storm-software/linting-tools config";
args = [
"--config=${config.git.root}/packages/linting-tools/src/taplo/config.toml"
"--cache-path=${config.git.root}/node_modules/.cache/taplo"
];
excludes = [ "Cargo\\.toml$" ];
};
zizmor = {
enable = true;
description = "Zizmor with @storm-software/linting-tools config";
args = [
"--offline"
"--config=${config.git.root}/tools/config/zizmor.yml"
];
files = "^\\.github/workflows/.*\\.(yml|yaml)$";
};
};
};
}