# Using nix-direnv, FWIW

function_exists() {
  declare -f -F $1 > /dev/null
  return $?
}

watchf() {
  if function_exists nix_direnv_watch_file; then
    nix_direnv_watch_file "$@"
  else
    watch_file "$@"
  fi
}

watchf *.nix nix/*.nix

use nix
