Nix To get a devshell hooked into a recent version of Rust, you add the overlay into your flake.nix file.

  # ...
  inputs.mozilla-overlay = {
    type = "github";
    owner = "mozilla";
    repo = "nixpkgs-mozilla";
    flake = false;
  };
 
  outputs = { self, nixpkgs, mozilla-overlay, flake-utils, devshell }:  # make sure mozilla-overlay is in the inputs
 
  overlays = [
    (import mozilla-overlay)  # add it into the overlay. The ()'s around it make it into a function, which is required for overlays.
    devshell.overlay
    self.overlay
  ];