-
Notifications
You must be signed in to change notification settings - Fork 6
/
devenv.nix
60 lines (55 loc) · 1.3 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
{ inputs, pkgs, ... }:
inputs.devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
(
{ pkgs, ... }:
{
# devenv configuration
packages = with pkgs; [
age
sops
cachix
deadnix
statix
nixd
cargo-edit
pkg-config
glib
gexiv2 # for reading metadata
];
languages.rust.enable = true;
scripts = {
crb.exec = ''
cargo run --manifest-path "packages/dotfiles-rs/Cargo.toml" --bin "$1" -- "''${@:2}"
'';
crrb.exec = ''
cargo run --manifest-path "packages/dotfiles-rs/Cargo.toml" --release --bin "$1" -- "''${@:2}"
'';
};
pre-commit = {
hooks = {
deadnix = {
enable = true;
excludes = [
"generated.nix"
"templates/.*/flake.nix"
];
settings = {
edit = true;
};
};
nixfmt-rfc-style = {
enable = true;
excludes = [ "generated.nix" ];
};
statix = {
enable = true;
excludes = [ "generated.nix" ];
};
};
};
}
)
];
}