Init commit

This commit is contained in:
Markus Scully 2024-11-14 20:56:28 +00:00
commit 2c9d020c84
No known key found for this signature in database
GPG key ID: B8470B38660AF9E8
13 changed files with 986 additions and 0 deletions

60
devenv.nix Normal file
View file

@ -0,0 +1,60 @@
{
pkgs,
lib,
config,
inputs,
...
}:
let
pkgs-unstable = import inputs.nixpkgs-unstable {
system = pkgs.stdenv.system;
config.allowUnfree = true;
};
in
{
# https://devenv.sh/basics/
env.GREET = "devenv";
# https://devenv.sh/packages/
packages = [
pkgs-unstable.git
pkgs-unstable.rustup
pkgs-unstable.code-cursor
pkgs-unstable.curl
pkgs-unstable.jq
];
# https://devenv.sh/languages/
languages.rust = {
channel = "nightly";
components = [
"cargo"
"rust-src"
"rustc"
"clippy"
];
enable = true;
};
enterShell = ''
rustup component add clippy
'';
enterTest = ''
echo "Running tests"
git --version | grep --color=auto "${pkgs.git.version}"
cargo clippy -- -D warnings
'';
pre-commit.hooks = {
shellcheck.enable = true;
clippy = {
enable = true;
name = "clippy";
entry = "cargo clippy -- -D warnings";
files = "\\.rs$";
language = "system";
};
};
}