Nix-direnv: error current version v2.3.0 is older than the desired version v2.4.0

I created a repo using the nix-direnv template, which prints the message when entering the project. Then I updated my nix-config to the latest nixpkgs-unstable branch and run the following commands, but the message still exists.

nix flake update
darwin-rebuild switch --flake .

I checked there are both nix-direnv-2.4.0 and nix-direnv-2.3.0 in the /nix/store.
How can I debug the problem? Thanks

Check what version is in both home-manager and nixos. They might have the older 2.3.0 version pinned (programs.direnv.nix.enable, I believe). But even if this is not really an error but more an information that your current .envrc won’t use the system provided nix-direnv but is upgrading it to the latest version as specified in the template: ~goofansu/gpg-toolkit (main): .envrc - sourcehut git
So you also just do nothing and just wait until your nixos’s nixpkgs version has the latest nix-direnv version.

@Mic92 Thank you for pointing out the place that requires nix-direnv 2.4.0. I didn’t find the place that pins nix-direnv to 2.3.0, anyway, I’ll leave it there as it is not an error.