How to use direnv with Nix flakes (and doom emacs)

Managing development environments can be annoying when switching between projects, and you don&rsquo;t always want to install your devtools system-wide. direnv helps by automatically loading and unloading environment variables when you enter or leave a project directory. If you’re using Nix flakes, direnv integrates seamlessly with your flake.nix (or legacy shell.nix) so you always have the right…