Wow! How have I lived without #direnv by now? It's loading and unloading virtual environment when I enter and leave project dir in terminal. https://direnv.net It works seamlessly in #Emacs and integrates with eglot through envrc.el
Wow! How have I lived without #direnv by now? It's loading and unloading virtual environment when I enter and leave project dir in terminal. https://direnv.net It works seamlessly in #Emacs and integrates with eglot through envrc.el
Managed to change my #nixos configuration, home manager setup, and most of my #direnv setups to using #nix flakes all following the same nixpkgs version.
As usual jekyll proved to be the most challenging, but now it is installed with plain nix packages.
Next step is to do some prompt hacking. And by prompt hacking I mean fiddling with PS1 to include current devshell.
Now that RustRover is free for OSS, has anyone got it working *nicely* with Nix Direnv?
Seeing some of the chatter about Starship lately, and piggybacking off of @treyhunner 's recent foray, I decided to update my coding environment as well.
I hardly understood anything when I got started, but I'm pretty happy with the results. Thanks @webology as well as @kattni for pressuring Trey
A small hint for all the #Elixir users out there.
I don't know about you, but I always cringed at how dirty mix is when it comes to installing third party toolchain dependencies.
Twelve years into using it, I learned that you can actually localise third-party installations!
Here's a snippet from my #direnv.
```sh
mkdir -p .nix-mix .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-mix
[ -z "$(ls -A .nix-mix)" ] && mix local.hex
[ -z "$(ls -A .nix-mix)" ] && mix local.rebar
```
This can make your #Nix builds pure without faking HOME!
I started migrating from virtualenvwrapper to direnv this week.
I also adopted uv for venv management and Starship for my zsh prompt.
Thanks to @webology for the nudge that resulted in this post being published today, thanks to @kattni for sharing a very plain Starship config file, and thanks to everyone who participated in the thread earlier this week.
https://treyhunner.com/2024/10/switching-from-virtualenvwrapper-to-direnv-starship-and-uv/
I've done some thinking about how to make #uv and #direnv play together with minimal hassle and maximum repeatability. Inspired by @hynek's posting about uv's speed and usability, here's that post: https://offby1.website/posts/uv-direnv-and-simple-envrc-files.html
Let me know if it helps you, or if you've got better ideas!
Flake_env, my nix-direnv "competitor" (#nix #direnv) written in OCaml, is getting close to a 1.0 release! If you want to try it out, I would love some feedback. Feel free to message me here or open a ticket at https://sr.ht/~bryan_bennett/flake_env
I have recently reduced the closure size SUBSTANTIALLY with a rewrite avoiding large third party libraries. We are talking like...1.2Gb reduction here...
@philsplace @b0rk I’m fancy so I have it in my #Powerlevel10k prompt and #iTerm2 status bar. Should probably omit some items from the former when it detects I'm using the latter.
(The other noise is from the #direnv environment loader and #asdf runtime version manager.)
@funkatron
@Perl Someday I should write up how I manage #Perl projects with #asdf and #direnv. Everyone talks about #perlbrew and sometimes #plenv, but it’s nice to have a single way to manage local project environments for any #programming language, especially when the project has a stack of languages and runtimes that you want to specify in one place.
@funkatron Can’t say anything about music production, but #macOS #Sonoma seems solid for multi-runtime (#NodeJs, #Perl) project-specific local #development environments managed with #asdf and #direnv installed from #Homebrew. #Docker and #RancherDesktop work too for when I have to get #container-happy.
I did not really get your issues, but here is how I combine #guix, #direnv and venvs: In my project dir, .envrc installs python in a guix profile ('use_guix' in direnv, if missing), creates a venv (if missing) which uses the python in the profile for --system-site-packages, and activates it, then installs requirements.txt in it.
Since the profile is "registered" it will not vanish.
I would expect nix bring able to do the same.
@publicvoit
@randomgeek @klardotsh #asdf is pretty magical when you also combine it with its #direnv plugin and you have one config file that specifies every tool version for polyglot projects, instead of separate plenv, nvenv, rbenv, et al config files.
It will also download, build, and maintain the installations for multiple versions of those runtimes using a single syntax. And can find the latest version on its own.
And it has built-in support for #Nushell.
All I need to do is fire up Emacs. Guix and Direnv take care of the rest.
Today, we build off of the 𝓉𝑒𝓇𝓂𝒾𝓃𝒶𝓁 𝓋𝑒𝓁𝑜𝒸𝒾𝓉𝓎 in the previous Drop and focus on leveling up the safety, resilience, and utility of our humble (and very likely way too populated) shell environments.
Drop #216 (2023-03-09)
EPA (Environment Protection & Agency)
— #declare/#readonly; write safer scripts & communicate intent to your future self and team
— #direnv/#quickenv;per-dir/project environments (Golang)
— #autoenv; slightly different take on ^^ in Rust
Read/sub: https://dailyfinds.hrbrmstr.dev/p/drop-216-2023-03-09-epa-environment