summaryrefslogtreecommitdiff
path: root/devenv.nix
diff options
context:
space:
mode:
Diffstat (limited to 'devenv.nix')
-rw-r--r--devenv.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/devenv.nix b/devenv.nix
new file mode 100644
index 0000000..04cf216
--- /dev/null
+++ b/devenv.nix
@@ -0,0 +1,35 @@
+{ pkgs, config, ... }:
+
+let
+ feluments = config.languages.rust.import ./. { };
+in
+{
+ delta.enable = true;
+
+ languages.rust = {
+ enable = true;
+ components = [ "rustc" "rust-analyzer" "cargo" "rustfmt" "clippy" ];
+ };
+ packages = with pkgs; [
+ git
+ bacon
+ cargo-seek
+ cargo-nextest
+ ];
+ scripts.watcher = {
+ exec = ''
+ watchexec -c -e rs "cargo clippy && cargo test && cargo run"
+ '';
+ packages = [ pkgs.watchexec ];
+ };
+ enterShell = ''
+ cargo update
+ '';
+ git-hooks.hooks = {
+ rustfmt.enable = true;
+ clippy.enable = true;
+ };
+ outputs = {
+ inherit feluments;
+ };
+}