Preferences

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.

methyl
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 OP
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.
dloreto
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.

stavros OP
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.

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.)

ptspts
It would be great if devbox displayed the recommended command to install Nix upon first run. First users of devbox shouldn't be expected to know the details on how Debian packages Nix.
That's a smart workaround. Maybe a

> For the best experience, we recommend installing Nix via the official installer, i.e., via this one-liner:

> > curl | bash, blah blah blah

> (Existing Nix users who have or prefer an alternative setup can still use devbox! See this page about compatibility: [link to a 1/2 page reference doc]

(Happily, the experimental features now experiencing widespread uptake in the community will make some of those differences I outlined less relevant.)

dloreto
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

stavros OP
No problem! I suspected as much about the download, a progress bar would be excellent though. Overall, this is a fantastic idea, and I definitely see myself switching to it basically immediately.

This item has no comments currently.