nix-direnv
devenv

nix-direnv | devenv | |
---|---|---|
29 | 102 | |
2,012 | 4,804 | |
4.1% | 3.2% | |
7.9 | 9.9 | |
9 days ago | 7 days ago | |
Shell | Nix | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nix-direnv
- Enlightenmentware
-
Poetry2Nix Development Flake with Matplotlib GTK Support
You might want to checkout direnv and nix-direnv for added convenience.
- A faster, persistent implementation of direnv's use_Nix and use_flake
-
How do multiple versions of the package internally work?
BTW: I personally use direnv with nix-direnv. This basically works by setting your shell with proper tooling when you enter the directory.
-
I have a few beginner question, what is the difference between nix shell/env and what is the difference between flakes/home-manager?
I'm not sure what you mean by nix env, maybe you are referring to nix-direnv?
-
Just a reminder to make sure Garbage Collection is running
Although currently I'm using direnv + nix-direnv. Keep in mind that direnv has builtin nix support which is very basic and doesn't do any caching. So you still needs this add-on to preserve roots.
-
What do you install with configuration.nix and home manager
I distinguish between system level things and user level things, even though I don't really have different users on my machine. I install the bare minimum number of packages + a lot of different drivers in the configuration.nix, and desktop and editor related things in HM. For development environment, I have environment per project using mkShell and https://github.com/nix-community/nix-direnv, which allows you to switch to the specific environment once you cd into the directory. (Although I do have python installed globally with some commonly used packages such as numpy, so I can just start python and write something when I need to, without creating an environment)
-
How do YOU use your PKMS?
I further make my software projects so that when I click a link I go into an environment pre-loaded with their dependencies so dropping in/out of projects is always frictionless. I do this with the reproducibility guarantees of nix, along with glue like nix-direnv and envrc-mode to direnv.
-
Nuenv: an experimental Nushell environment for Nix
(I also use nix-direnv)
-
NixOS + Haskell best practices circa March 2023
direnv
devenv
-
Easy development environments with Nix and Nix flakes!
If writing a devshell on your own seems more complicated than necessary, you can use tools like Devenv or Devbox (by the same team that built NixHub), which are both built on Nix. Devenv provides nice wrappers to automatically add languages, services (like postgres or redis), etc. on top of your flake, without having to do the shenanigans we had to do with Valkey. Devbox on the other hand, lets you skip writing Nix entirely, since they have their own CLI and lock file that pull packages from nixpkgs.
- Mise: Dev tools, env vars, task runner
-
Flox, a better alternative to Dev Containers
I've just tried both `devenv` and `flox`, and the latter had two related niceties:
- Direnv wants to put its config inside the root of a git repo, which makes it hard to ignore. Flox's config is all in a `.flox` directory, so I could `echo * >> .flox/.gitignore` in any repo without changing the repo's gitignore.
- There seems to be no way to run `direnv` on an environment that's not the current working dir, see https://github.com/cachix/devenv/issues/67.
OTOH, `flox` was a bit harder to install in an existing nix setup, at least if I wanted to do a cached install. You can follow the instructions in https://flox.dev/docs/install-flox/#__tabbed_1_6, or you could add yourself to Nix's "trusted users" (which makes sense only if you're the only user on the computer using Nix).
- Devenv – Fast, Declarative, Reproducible, and Composable Developer Environments
-
An Introduction to Nix for Ruby Developers
devenv.sh merits exploration too. It is something of a hybrid, with a JSON-like programming language, YAML configuration, and Docker-like composition of services.
-
Stripe's Monorepo Developer Environment
We've been building https://devenv.sh for that reason, I expect more companies to go back to local development once they see DX has improved locally.
-
Switching from Arch to NixOS
I'm of the mindset that NixOS is too much, all at once. I understand the power of the Nix ecosystem, but the barrier of entry remains too high to enter.
I've switched to using devenv[1] as a first step. This at least allows me to experiment with using nix to configure my dev environment in a per directory fashion, while allowing me to use the Linux distro of my choice.
[1]: https://github.com/cachix/devenv
-
The Overengineered Resume with Zola, JSON Resume, Weasyprint, and Nix
It would be bring less complexity using https://devenv.sh/ to provide the tooling :-)
-
Python Has Too Many Package Managers
If you haven't yet, check out https://devenv.sh. It's pretty nice for python packages and installs your requirements to a project local venv for you via whatever tool you want (pip, poetry, uv etc).
I've been using it for a couple of years and it's super nice to be able to manage both python and "native" dependencies, and other non-python development tools all together.
I used just nix and whatever python packages are already in nixpkgs for several projects. And that works really really well until you run into an issue with compatibility like I did. It seems to mostly happen when some extremely common tool like `awscli2` depends on a specific version of some package and so it's pinned.
- FLaNK-AIM Weekly 13 May 2024
What are some alternatives?
devshell - Per project developer environments
devbox - Instant, easy, and predictable development environments
lorri - Your project's nix-env
flox - Developer environments you can take with you
naersk - Build Rust projects in Nix - no configuration, no code generation, no IFD, sandbox friendly.
direnv - unclutter your .profile
nix-config - :space_invader: NixOS configuration
rnix-lsp - WIP Language Server for Nix! [maintainer=@aaronjanse]
nix - Nix, the purely functional package manager
flake-templates - A collection of Nix flake templates for adding a reproducible environment quickly
macpine - Lightweight Linux VMs on MacOS
