doomemacs/modules/tools/direnv
Henrik Lissner 1a05e2fa64
bump: :tools
NicolasPetton/pass@c721604b3b -> NicolasPetton/pass@ed7031c5c3
Silex/docker.el@6997c86a24 -> Silex/docker.el@d5255a65b7
alphapapa/magit-todos@cadf29d1cc -> alphapapa/magit-todos@debb77b358
andras-simonyi/citeproc-el@290320fc57 -> andras-simonyi/citeproc-el@c61c98b9d2
doomelpa/code-review@26f426e992 -> doomelpa/code-review@c34ff1ee64
editorconfig/editorconfig-emacs@2fed9599bc -> editorconfig/editorconfig-emacs@4b81a59928
emacs-citar/citar-org-roam@761eed6678 -> emacs-citar/citar-org-roam@7d67dccf80
emacs-citar/citar@2c0547db57 -> emacs-citar/citar@885b86f673
emacs-lsp/lsp-mode@02c5ba59ce -> emacs-lsp/lsp-mode@fb88cc6b8b
emacs-straight/eglot@f73594f589 -> emacs-straight/eglot@cd4e45b700
emacs-straight/rainbow-mode@24437ec2c6 -> emacs-straight/rainbow-mode@70ed10d410
emacs-tree-sitter/tree-sitter-langs@5eb24557f5 -> emacs-tree-sitter/tree-sitter-langs@20fbbb8573
emacsorphanage/quickrun@6f96318930 -> emacsorphanage/quickrun@248149b026
hcl-emacs/terraform-mode@39d2fd5bfc -> hcl-emacs/terraform-mode@e8b57df8c2
jacktasia/dumb-jump@d9503c157a -> jacktasia/dumb-jump@ede6a04187
magit/forge@ba35ffc9ba -> magit/forge@b16b6ec4f7
magit/magit@4881835572 -> magit/magit@54d37dc14c
meain/evil-textobj-tree-sitter@9a9edd42a2 -> meain/evil-textobj-tree-sitter@220ceae065
purcell/envrc@33d01388ce -> purcell/envrc@1385e72a73
rejeep/prodigy.el@a3be00d3b9 -> rejeep/prodigy.el@cc68fa9d60
tmalsburg/helm-bibtex@ef07adfeda -> tmalsburg/helm-bibtex@bf184cc311
xuchunyang/osx-dictionary.el@0715e5a3ac -> xuchunyang/osx-dictionary.el@1f5a74f3e5
yoshiki/yaml-mode@3fcb36d603 -> yoshiki/yaml-mode@5b58248ab2
zx2c4/password-store@28cec11f1d -> zx2c4/password-store@b5e965a838
2024-02-04 19:07:25 -05:00
..
config.el fix(direnv): envrc triggering in its own internal buffers 2023-03-11 19:50:28 -05:00
doctor.el Add tools/direnv module 2019-04-05 03:16:37 -04:00
packages.el bump: :tools 2024-02-04 19:07:25 -05:00
README.org docs(*): replace all-the-icons with nerd-icons 2023-09-16 20:19:11 +02:00

:tools direnv

Description   unfold

This module integrates direnv into Emacs.

󰐃 direnv is an environment switcher for the shell. It knows how to hook into bash, zsh, tcsh, fish shell and elvish to load or unload environment variables depending on the current directory. This allows project-specific environment variables without cluttering the ~/.profile file.

Before each prompt, direnv checks for the existence of a ".envrc" file in the current and parent directories. If the file exists (and is authorized), it is loaded into a bash sub-shell and all exported variables are then captured by direnv and then made available to the current shell.

Module flags

This module has no flags.

Hacks

  • envrc-mode has been modified to fail gracefully if direnv isn't available.
  • envrc-global-mode has been modified to activate envrc-mode sooner in the major mode activation process, so that any env state performed in mode hooks aren't overwritten by direnv.
  • Added direnv support for Org src blocks.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module requires direnv.

MacOS

brew install direnv

Arch Linux

direnv is available on the AUR:

yay -S direnv

NixOS

environment.systemPackages = [ pkgs.direnv ];

Or $ nix-env -i direnv

TODO Usage

󱌣 This module's usage documentation is incomplete. Complete it?

To make use of direnv you need a .envrc file in a directory. Any time you open a file or buffer in said directory, the doom-package:envrc Emacs package will kick in, activate the local env, and inject it into Emacs for the current buffer.

TODO Configuration

󱌣 This module has no configuration documentation yet. Write some?

Troubleshooting

Report an issue?

direnv + nix is slow

Consider augmenting direnv with lorri, which will cache nix builds and speed up direnv tremendously:

services.lorri.enable = true;

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?