Lurker News
Devbox is a command-line tool that lets you easily create isolated shells and containers. You start by defining the list of packages required by your development environment, and devbox uses that definition to create an isolated environment just for your application.

In practice, Devbox works similar to a package manager like yarn – except the packages it manages are at the operating-system level (the sort of thing you would normally install with brew or apt-get).
See it in action: https://youtu.be/WMBaXQZmDoA

Comments (185) 47 threads

Earlier comments
aranelsurion#
Very good initiative. I remember the first time I tried `nix-shell` I thought how nice it is to have this, and too bad its UX -IMHO like the rest of nix ecosystem at that time- will hinder its adoption.

Great to see it being repurposed and presented with a much nicer UX this time.

klysm#
I wonder if this will do for nix what docker did for containers. The interesting part of the timeline is that eventually docker became less relevant, but it was still required to achieve that initial success.
stavros2 replies#
I want to love this, and it looks amazing, but it doesn't work for me:

    05:01:13 $ devbox add python2
    Error: Package python2 not found.
Really bad first-run experience when the demo command doesn't work, sadly.
dloreto1 reply#
It's likely you have not installed the pre-requisites: namely nix. Without nix, it can't find the package.

That said, we'll improve the error message so that when nix is not installed it tells you you should install it.

stavros2 replies#
As far as I can tell it is:

    05:10:27 $ nix --version
    nix (Nix) 2.6.0
I installed it with `apt install nix-bin` on Ubuntu 22.04.

EDIT: I installed Nix with the old-fashioned "pipe shit to bash" method and it seems to work now. When I say "work", I mean it in the sense of "doesn't fail", because it's been stuck at `devbox shell` for a good five minutes now with no indication.
Not to be too negative, I think this is a great idea and is going to be fantastic, but I guess, like any pre-release software, there are some teething problems.

dloreto1 reply#
The initial shell is slow: nix reinstalls a bunch of stuff the first time it runs. We’re planning to add a progress bar that makes that clear.

Sorry for the hiccups – it is our first pre release version but feedback like yours helps us harden it. It should definitely be considered beta software right now, but we’ll have it hardened before announcing a GA/1.0 version

Continue this thread — 1 reply

pxc2 replies#
The package you want on Debian is called nix-systemd-setup or something like that, not nix-bin. (nix-bin just gives you the Nix binary, and I guess if you created /nix yourself you could use it for a single-user install.) The expectation is that you want a multiuser install, which requires a running daemon and the creation of some system users, and the nix setup package handles that. I think the package descriptions do outline this, and FTR you almost never want just a `-bin` package on Debian-based distros. The convention is used to allow minimal installation of just the binaries from packages when they're likely to be used by other parts of the system rather than end users.

The Nix package for Debian has some other deviations in the way it's plugged into the system and the initial setup. The default channel (source of packages) doesn't get set up for you, the PATH ordering is different, and NIX_PATH and the NIX_PROFILES_PATH (and maybe PATH?) aren't configured for `env_keep` with PAM's `sudo` configuration so interactions with `sudo` are different. Anyway failure to find any packages is probably due to the lack of enabled channels or the setup not being completed (needing that systemd-setup package).
(All of this stuff is up to the maintainers of the Debian package and Debian policy. It's fine, but it violates the assumptions of some third-party Nix tooling.)

Continue this thread — 2 replies

methyl1 reply#
This error happens because you didn't spawn a new shell after installing nix and devbox. I think README could make it more obvious, as I stumbled upon this as well.
stavros#
I did, I was using the wrong Nix package, turned out. In the end I ended up curl | bashing it, and it worked. I really like this project, just needs a bit of love in the error messages.

Load more comments