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
Can I somehow use #nix #direnv to change my git config for a subdirectory and its descendants? I.e. using a different email and author name for all repos in that tree. I know I can use home-manager to configure it on a user-level, but on a directory level for more than one repo would be pretty useful to keep work and private repos apart.
@bolapara @JackMcCrack So, good news! After noticing the remaining permissions errors I was experiencing with dir-env revolved around symlink issues, I decided to backup the card and format it fresh using a different format type.
Turns out formatting the SD card to ext4 (instead of exFAT) was all I needed to resolve the symlink issues.
Now I can take advantage of external storage for project code and still use #direnv to enjoy my #nixos on #surfacepro experience! :blobcatcool: :nixos: π€
So, I've got a question for all my fellow #nix and #nixos users out there:
I've continued to migrate various configs and building up some useful flake templates to use with the awesomeness that is #direnv ...however, since my #surfacepro has limited storage, I use it's SD slot for storing Project files...and direnv fails to fully load! π
I just get nix-store permission errors (even though I've made sure permissions are right for SD card). Yet env spawns on main drive no problem.. :nixos:
#nix #nixos #direnv #surfacepro
Yay, finally found the time to fix #BevyEngine #Bevy running on my development/gaming rig on #NixOS via a #DirEnv devshell.
Now i just need time to get back in my old learning project.
@bevy
#bevyengine #bevy #nixos #direnv
New blog post!
More hashicorp vault magic! This time I'm talking about auto loading secrets into your shell's env with direnv.
https://tilde.club/~chimbo/blog/posts/hashicorp-vault-and-direnv-automating-env-secrets.html
#vault #hashicorp #direnv #blog #tildeclub
I wrote a blog post: "Using #direnv with #terraform, #terragrunt, #saml2aws, #SOPS and #AWS #KMS"
https://jon.sprig.gs/blog/post/3057
#direnv #terraform #terragrunt #saml2aws #SOPs #aws #kms
@ovid @barubary #TIMTOWTDI abounds, but for the past year Iβve favored https://asdf-vm.com and its https://github.com/asdf-community/asdf-direnv plug-in for pinning both single-language and polyglot projectsβ runtimes and configs. Might want to look into it since it seems like you need to do a lot of shuffling from client to client.
#timtowtdi #asdf #direnv #perl #nodejs
@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.
@lenny_ Yes, that works perfectly fine. I am trying to avoid this initial step, so you can open VsCode from anywhere.
As you have the direnv hook in place, for you to do this is only a matter of installing the extension https://marketplace.visualstudio.com/items?itemName=mkhl.direnv and creating a .envrc file with the line :
use nix
That will enable all the environment for the VsCode tooling automagically based on my experience.
I wrote a blog post: "Using multiple #GitHub accounts from the Command Line with #EnvironmentVariables (using #direnv) and per-account #SSH keys" https://jon.sprig.gs/blog/post/2853
#github #environmentvariables #direnv #ssh
All I need to do is fire up Emacs. Guix and Direnv take care of the rest.
#productivity #dev #guile #direnv #guix #emacs
Struggling to setup #rtx to work with #direnv for your Python projects? I worked out the confit you need π
https://gabnotes.org/setup-rtx-with-direnv-for-python/
Thanks @noboilerplate for the YouTube video where I discovered #rtx-cli π (linked in the article)
#direnv #shell #cli #unix #12factor #secrets
direnv is an extension for your shell. It augments existing shells with a new feature that can load and unload environment variables depending on the current directory.
Use cases
- Load 12factor apps environment variables
- Create per-project isolated development environments
- Load secrets for deployment
#12factor #secrets #direnv #shell #cli #unix
My particular favourite underappreciated way to set up a robust isolated #Python environment is #direnv + #pyenv + #pip-tools.
Dependency management:
- Keep abstract dependencies in requirements.in or pyprojects.toml
- Compile to a lockfile with pip-compile
- Update your environment with pip-sync
Virtualenv management with direnv:
- pyenv install 3.11.0
- echo layout pyenv 3.11.0 > .envrc
- enjoy automatic local venv creation and activation
It's very boring, imposes few opinions, won't break!