Skip to content

data-cartel/rust.nix

Repository files navigation

Rust Nix Flake Quickstart

Use as a Nix flake template

Full Rust dev shell + CI:

nix flake init -t github:data-cartel/rust.nix

CI only — drops just .github/workflows/ci.yaml into a project that already has a flake-based dev shell:

nix flake init -t github:data-cartel/rust.nix#ci

Nix-only — drops just flake.nix and .envrc into an existing Rust project, leaving Cargo.toml and src/ alone. The flake consumes data-cartel/rust.nix as an input and re-exposes its dev shell:

nix flake init -t github:data-cartel/rust.nix#nix

Prerequisites

Install Nix

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

Install Direnv

nix -v flake install nixpkgs#direnv

Hook Direnv to your shell, e.g.

# For bash
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
source ~/.bashrc

# For zsh
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc
source ~/.zshrc

Enable direnv for the local copy of the repo

direnv allow

Get Rusty!

About

Starting point for your Nix-powered Rust adventures

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors