diff --git a/.gitignore b/.gitignore index 66274d6..664f128 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .direnv/ .idea/ /target +.rust-toolchain *.act *.bmp *.jpg diff --git a/flake.nix b/flake.nix index 0c6edf7..eb9cb5f 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,17 @@ darwin.apple_sdk.frameworks.SystemConfiguration ]; RUST_BACKTRACE = 1; + + # Copy rust-toolchain to project directory for easy use in IntelliJ + shellHook = '' + if [ -L ./.rust-toolchain ] && [ "$(readlink ./.rust-toolchain)" = "${rust-toolchain}" ]; then + echo "Rust toolchain symlink is already correct." + else + rm -f ./.rust-toolchain + ln -s ${rust-toolchain} ./.rust-toolchain + echo "Rust toolchain symlink updated." + fi + ''; }; }); }