Earlier quoted context omitted.
> I’d love a tool where i can just `cd /tmp/my-hourlong-project` and then `devenv python` to get a python shell that’ll have everything i often use (and probably more) There's a dozen projects that do this. But it would honestly take you as much time to write a shell script to do it as use some other project to do it. Like, seriously: #!/usr/bin/env sh set -eu [ "${DEBUG:-0}" = "1" ] && set -x MY_TEMPLATE="${MY_TEMPL…
I understand this isn't super complex semantically, but even as someone who has used Linux full time on all of my personal desktops/laptops for 10 years now, I don't think I could write shell code like that within an order of magnitude of the time it would take me to google and find a project to do this. Maybe I'm just an outlier, but my perception is that most people don't have instant recall of advanced shell scrip…
Devenv.sh: Fast and reproducible developer environments using Nix
111–120 of 171 posts
Re: Devenv.sh: Fast and reproducible developer environments using Nix
#112Earlier quoted context omitted.
Big drawback of devbox is that you cannot pin packages to specific SHA, which is quite a big limitation when it comes to versitality. I think you can do that on devenv.sh.
The latest version of devbox allows pinning the sha of the nixpkgs repository to whatever you want. We don't yet allow pinning on a per-package basis within nixpkgs, but we're working on that.
Re: Devenv.sh: Fast and reproducible developer environments using Nix
#113Can someone explain to me the advantage of using Nix over containers? What do they offer that are not provided with using docker or other container platform.
Re: Devenv.sh: Fast and reproducible developer environments using Nix
#114Earlier quoted context omitted.
Yeah I found it odd that there is no first class feature for versioning. I wonder what’s the reason, since it’s a pretty obvious need for a package manager.
> Yeah I found it odd that there is no first class feature for versioning. I wonder what’s the reason, since it’s a pretty obvious need for a package manager. Binary package managers need a first-class notion of versioning for install-time dependency resolution, Nix doesn't actually perform install-time dependency resolution. Nixpkgs is a monorepo, and thanks to the way it supports side-by-side installations of confl…
Re: Devenv.sh: Fast and reproducible developer environments using Nix
#115Can someone explain to me the advantage of using Nix over containers? What do they offer that are not provided with using docker or other container platform.
One difference is that Docker containers use a separate file system isolated from the host, so you have to separately install your editor/shell in there, mount/clone your dotfiles, etc. With a Nix-based development environment, it can add/override the tools you need, but you get to keep your shell customizations, editor config, etc. Also reproducibility; it can be achieved with containers if you save the artifact (th…
Any way to hack this? Just pretend it's a different date, the pointers to the latest package will changed to reflect that.
Or somehow record the exact versions when you first build the container, and freeze that.
Re: Devenv.sh: Fast and reproducible developer environments using Nix
#116Also when trying to adopt nix for the enterprise it is still a tough barrier. At least for me struggling how to package something like the synology active backup client nix or how to setup your cups printers in nixos.
Besides that I hope for nix to get secure boot support.
Re: Devenv.sh: Fast and reproducible developer environments using Nix
#117Can someone explain to me the advantage of using Nix over containers? What do they offer that are not provided with using docker or other container platform.
- Nix is very good at cross platform support. A single entry-point creates environments on both MacOS and Linux.
- Docker containers run slower on MacOS because the virtualization overhead.
- Docker images can provide a reproducible environment but the images themselves aren’t reproducible.
Re: Devenv.sh: Fast and reproducible developer environments using Nix
#118Hi all, I'm the author of https://devenv.sh , https://cachix.org and https://nix.dev . I've been part of the Nix community for more than 10 years and in the last 4 years focused on making it documented, simple and accessible for any developer. After building Cachix (where you can store any software binaries with a few steps) we realized that there needs to be an intuitive interface for crafting developer environments…
I hope this doesn't come off critical - but what does this offer over a flakes-based `devShell` with `nix develop`? The two things that stand out that maybe look slightly easier are the processes section, and the pre-commit hooks sections - but from what I can tell these are generally all solveable via native flakes. Just curious - if this is a valuable tool to add to the arsenal, I'm all for it, but I'm curious what…
The main benefit is abstraction using modules: this allows you to extend, compose and abstract your environment. Processes and pre-commit hooks are only the beginning of what's possible.
There's also higher-level CLI interface for building images, sharing environments, etc.
Note that this is only scratching the design surface of what's possible.
Re: Devenv.sh: Fast and reproducible developer environments using Nix
#119Hi all, I'm the author of https://devenv.sh , https://cachix.org and https://nix.dev . I've been part of the Nix community for more than 10 years and in the last 4 years focused on making it documented, simple and accessible for any developer. After building Cachix (where you can store any software binaries with a few steps) we realized that there needs to be an intuitive interface for crafting developer environments…
Looks great, looking forward to trying it out. I've been mentioning to a work colleague that someone needs to do for the somewhat baroque Nix tools and concepts what Docker did for containers. It just needs a nice porcelain over the top that provides some consistent CLI UX, but lets you dive down deeper as you get more comfortable with the system. As someone who just two weeks ago got into Nix/NixOS via this repo[1]…
This shouldn't be more than a day of work.
Re: Devenv.sh: Fast and reproducible developer environments using Nix
#120Hi all, I'm the author of https://devenv.sh , https://cachix.org and https://nix.dev . I've been part of the Nix community for more than 10 years and in the last 4 years focused on making it documented, simple and accessible for any developer. After building Cachix (where you can store any software binaries with a few steps) we realized that there needs to be an intuitive interface for crafting developer environments…
The nix language basics section of nix.dev finally got me to understand what is actually going on in a derivation file and in my default.nix, so thank you!