This is a template repository to get you started with creating a rust application using nix flakes.
The heart of this repository is the flake.nix
file, which sets rust using nix flakes up.
The flake uses the oxalica/rust-overlay
, which provides us with the different rust toolchain versions.
The toolchain we want to use, is specified in the rust-toolchain.toml
file, which you can edit to your requirements.
The overlay then reads this toolchain file and gets the appropriate versions of the tools.
For this to work you need
- Nix with flakes enabled
- (optional) direnv
- (optional) direnv-nix