-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevenv.nix
More file actions
96 lines (88 loc) · 1.91 KB
/
devenv.nix
File metadata and controls
96 lines (88 loc) · 1.91 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
{pkgs, ...}: {
# Cachix binary cache configuration
cachix = {
pull = ["mikkihugo"];
push = "mikkihugo";
};
# Languages and tools (matching our flake.nix setup)
languages = {
rust = {
enable = true;
channel = "stable";
};
elixir = {
enable = true;
package = pkgs.beam.packages.erlang_28.elixir_1_19;
};
};
# Pre-commit hooks for code quality
pre-commit.hooks = {
# Rust hooks
rustfmt.enable = true;
clippy = {
enable = true;
args = [
"--workspace"
"--all-targets"
"--all-features"
"--"
"-D"
"warnings"
"-D"
"clippy::all"
"-D"
"clippy::pedantic"
"-D"
"clippy::nursery"
"-D"
"clippy::cargo"
"-W"
"clippy::restriction"
"-A"
"clippy::missing_docs_in_private_items"
"-A"
"clippy::implicit_return"
"-A"
"clippy::missing_inline_in_public_items"
"-A"
"clippy::question_mark_used"
"-A"
"clippy::mod_module_files"
"-A"
"clippy::self_named_module_files"
];
};
# Security audit
cargo-audit = {
enable = true;
};
# Dependency linting
cargo-deny = {
enable = true;
args = ["check"];
};
# Elixir hooks
mix-format = {
enable = true;
excludes = ["deps/" "_build/"];
};
# Credo for Elixir linting
credo = {
enable = true;
};
};
# Environment variables
env = {
RUST_BACKTRACE = "1";
RUST_LOG = "debug";
};
# Shell hook for development
enterShell = ''
echo "🚀 Singularity Analysis Engine Development Environment"
echo "📦 Cachix: Configured for mikkihugo cache"
echo "🦀 Rust: $(rustc --version)"
echo "💜 Elixir: $(elixir --version | head -n1)"
echo ""
echo "Binary cache will be used for faster builds!"
'';
}