#!/bin/bash

# taken from https://fasterthanli.me/series/building-a-rust-service-with-nix/part-10 and updated the version

if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
  source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi

watch_file rust-toolchain.toml
use flake
