Direnv doesn't accept flake config

I’m using a Nix flake with direnv (nix-direnv). My flake contains nixSettings, including a bash-prompt and some extra-trusted-substituters/extra-trusted-public-keys settings. I would like these settings to be accepted automatically whenever the nix shell is loaded via direnv.

If I run nix develop --accept-flake-config the flake settings are applied, but navigating into the directory and loading the environment via direnv ignores the flake config.

These are the contents of my .envrc file:

if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
  source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="

use flake . --accept-flake-config

Is it possible to make direnv accept the flake config? It’s critical that my dev environment always apply the flake settings, so the bash prompt indicates that users are inside the develop shell and to prevent them needing to configure the extra substituters in nix.conf.

I saved the outputs of nix print-dev-env . --accept-flake-config and nix print-dev-env . to files and diffed them. It turns out they’re identical, so it appears the issue isn’t with how nix-direnv is calling print-dev-env, but with Nix itself not actually doing anything with the --accept-flake-config argument (despite it being listed as an option for print-dev-env here: nix print-dev-env - Nix Reference Manual).