{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { nixpkgs, flake-utils, rust-overlay, ... }: flake-utils.lib.eachDefaultSystem ( system: let overlays = [(import rust-overlay)]; pkgs = import nixpkgs { inherit system overlays; }; # rust = pkgs.rust-bin.stable.latest.default; # For nightly, replace with the following: rust = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default); in { devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ rust rust-analyzer ]; }; } ); }