It is absolutely not an anti pattern to check Direnv's `.envrc` in to source control, and if you don't then you're passing up on much of Direnv's value proposition.
Obviously don't put secrets in there. For secrets and overrides you can use separate a `.env` file which is not checked in, and source it in `.envrc` with `dotenv_if_exists`
The moment you commit an envrc file, you disallow the developer from using direnv for that directory to configure stuff related to their machine. It is an anti pattern, it was never meant to be committed. Put an envrc.example in repo if you want, or an envrc.project in there and tell the dev to load it (load_if_exists in direnv)
You can use direnv in conjunction with sops or your favorite cloud-centric secrets management utility to automate secrets handling without writing any plaintext secrets (or any secrets at all, if you want) to version control.
.envrc is a whole bash script, so it can invoke command line tools that fetch secrets over the network or decrypt them from the disk.
> This is dumb. The same way wrapping cars in bubble wrap would be dumb but also make the cars safer.
I doubt that would work, but if it did, why exactly would it be "dumb"?
> Most of the ideas in that channel are just insane emotional propaganda
Nah, most the ideas in that channel are the output of decades of empirical research on road/street safety by Dutch government agencies.
This video [1] from another channel describes how Dutch legal reforms in the early 90's enabled this evidence-based planning by correcting incentives and dramatically simplifying the regulatory framework.
I also really really want to use TRAMP by default but there are some issues that keep it from being painless.
The problem with getting lsp modes working in things like docker containers is:
- docker containers set PATH
- tramp doesn't use PATH by default
- even using `(add-to-list 'tramp-remote-path 'tramp-own-remote-path)` doesn't work
tramp-own-remote-path doesn't work because:
*Note* that this works only if your remote ‘/bin/sh’ shell supports
the login argument ‘-l’.
For whatever reason this doesn't work in many docker containers or perhaps is a NixOS issue... not totally sure.
I need to revisit this at some point, because otherwise you have to update your tramp connections every time the PATH in the docker file changes, which for many make it a non-starter.
I'm sympathetic to the security first approach of why tramp doesn't just use PATH or the behavior of `tramp-own-remote-path` by default, but it makes working with the insecure by default rest of the IT ecosystem more difficult.
Outlive right? Session handling is one thing I recall being the best feature of tmux/emacs.
The solutions are better these days for session handling in emacs with save-place-mode and one of:
persp-mode
bufler (using bookmarks)
However one of the biggest advantages for me is also having things like eshell or vterm get restored. That's arguably a less emacs friendly way of doing things than say using a compile buffer or async-shell-command with proper history, but... can't change over everything all at once :)