44
devenv.nix
Normal file
44
devenv.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Basic packages
|
||||
packages = with pkgs; [
|
||||
git
|
||||
cargo-watch
|
||||
cargo-edit
|
||||
lldb
|
||||
];
|
||||
|
||||
cachix.enable = true;
|
||||
|
||||
# Rust language support
|
||||
languages.rust = {
|
||||
enable = true;
|
||||
# Choose your channel
|
||||
channel = "stable"; # or "nightly", "beta"
|
||||
|
||||
# Optional: specify components
|
||||
components = [
|
||||
"rustc"
|
||||
"cargo"
|
||||
"clippy"
|
||||
"rustfmt"
|
||||
"rust-analyzer"
|
||||
];
|
||||
};
|
||||
|
||||
# Environment variables
|
||||
env.RUST_BACKTRACE = "1";
|
||||
|
||||
# Pre-commit hooks
|
||||
git-hooks.hooks = {
|
||||
rustfmt.enable = true;
|
||||
clippy.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user