Live data from Hacker News

Show HN: Flox 1.0 – Open-source dev env as code with Nix

github.com

41–50 of 201 posts

Re: Show HN: Flox 1.0 – Open-source dev env as code with Nix

#41
post #32

Earlier quoted context omitted.

On non-Linux it should be faster/less overhead; on all platforms I suppose it's just arguably easier/quicker to make changes & 'rebuild', and then the result is that that just is your environment, it's not a container inside it that you have to exec into or run commands through or make your IDE use or whatever. But mostly it's just two different approaches and people will be happy to argue about why there's is better…

I mostly agree, but one big thing missing is Nix is reproducible by default while docker is only repeatable.

Yeah, I was just trying to avoid anything to which you could say 'well I can do that with docker [and appropriate care & attention]'.

Re: Show HN: Flox 1.0 – Open-source dev env as code with Nix

#42

So, I read about a similar-ish tool to this recently, `devenv` - it sounds like both tools are based around Nix. The other article (talking about `devenv`) was discussing a migration away from running Vagrant. I had questions then that I still have now with this tool: assuming this, like `devenv` doesn't directly run a VM, how exactly do you solve actual platform differences - e.g. it's quite common to have developer…

Nix runs alongside other distributions in various OSs, including OSX. (Windows is being looked at, do not hold your breath.)

The cross-platform capability of `flox` comes from our usage of Nixpkgs, which includes allowance for some of the differences between platforms and makes them less of an issue.

If some piece of software has a specific difference when run on different platforms and you rely upon that difference, then your need to use that platform in some way: native, VM, translator, etc. Nix does make it easier to manage, build, distribute, multiple kinds of software.

Flox environments leverage this same foundation to expose the same environment on multiple systems and we plan to work on this more. What in particular would you be looking for?

Re: Show HN: Flox 1.0 – Open-source dev env as code with Nix

#43
post #10

What is the benefit of using Flox over plain nix-shell or nix develop?

Flox employee here! To start off by addressing how this relates to nix tools: - Our goal is to be more user friendly. You don't have to learn the Nix expression language or understand nix internals to be successful. - We've been able to add some opinionation and polish. Some of that is subjective, but some examples are: - We have a hybrid imperative/declarative interface. You can `flox install && flox list`, and thos…

So what you are offering here is essentially a small UX improvement over sharing a flake with a devshell in a Git repo?

I'm the first to admit that nix is way too cumbersome to use, but this alone doesn't seem like enough value add.

Re: Show HN: Flox 1.0 – Open-source dev env as code with Nix

#44
post #20

Hi Ron, congratulations on the release. My question is: how will you make money? I see you are the CEO, there is a company, and you have employees. Crunchbase links to news articles that make it seem like you've raised $24MM. Maybe I'm just missing it, but I can't see any pricing information on your landing page or in your docs. After I log in to FloxHub with my Github profile, I don't see any billing options. What i…

Appreciate the call out. Regarding pricing, bringing forward what you saw today for free and open source, was a major part of why I started Flox, with much more to come into it. What we released today will be free forever (both the open source client and the FloxHub services for sharing environments). We plan on expanding the offering to include a more robust private software catalogs that layers on top of the OOTB F…

Thank you for the answer. Best of luck to you and your investors!

Re: Show HN: Flox 1.0 – Open-source dev env as code with Nix

#45
post #35

One critical issue with "power of Nix without the learning curve" kind of products is that you still have Nix behind the scenes, including the /nix/store, which is intentionally not cleaned up by Nix automatically. So when users try out something that hides Nix from them, their drives inevitably fill up, which is super user-friendly because they have no idea how to reduce the amount of storage used. It's different wh…

Just set nix garbage collect to run every thirty minutes.

Re: Show HN: Flox 1.0 – Open-source dev env as code with Nix

#46

So, I read about a similar-ish tool to this recently, `devenv` - it sounds like both tools are based around Nix. The other article (talking about `devenv`) was discussing a migration away from running Vagrant. I had questions then that I still have now with this tool: assuming this, like `devenv` doesn't directly run a VM, how exactly do you solve actual platform differences - e.g. it's quite common to have developer…

Using Nix as a package manager works best with a repository called "Nixpkgs".

Nixpkgs focuses on reproducible builds, that means that for the same inputs, you always are going to get the same binary output.

All of Nixpkgs are built using nixpkgs, and they don't depend on any library outside nixpkgs, including glibc and compilers.

That means that you can "lock" your packages into a version, and you ensure that it will run the exact same version and configuration in all machines that you install it, no matter the underlying OS or how old/new it is, glibc problems etc...

This is the power of Nix.

All of this can be done via a simple

Flake.nix -> define the system Flake.lock -> automatically generated, defines the exact version of nixpkgs among others.

(Can also be done via channels but flakes are better imo)

Re: Show HN: Flox 1.0 – Open-source dev env as code with Nix

#47
post #35

One critical issue with "power of Nix without the learning curve" kind of products is that you still have Nix behind the scenes, including the /nix/store, which is intentionally not cleaned up by Nix automatically. So when users try out something that hides Nix from them, their drives inevitably fill up, which is super user-friendly because they have no idea how to reduce the amount of storage used. It's different wh…

We have the same problem with bazel at work, after a few months your machine is running out of disk space

Re: Show HN: Flox 1.0 – Open-source dev env as code with Nix

#48
post #35

One critical issue with "power of Nix without the learning curve" kind of products is that you still have Nix behind the scenes, including the /nix/store, which is intentionally not cleaned up by Nix automatically. So when users try out something that hides Nix from them, their drives inevitably fill up, which is super user-friendly because they have no idea how to reduce the amount of storage used. It's different wh…

Supporting rollback and history means disks can fill up. With Nix, this is usually due to a bunch of GC roots pointing to profiles and packages that then cannot be cleaned up. Our environments are not just symlinks, but have a declarative format (under the hood, flakes) so one can remove them, but also reproduce them as needed. So GC'ing them is less destructive than with using `nix-env`/`nix profile`. This allows us to be more aggressive in cleaning up old generations.

So the strategy is to ensure there is always a declarative+reproducible way to recover the things you clean up, then we can apply various heuristics to avoid disks from filling up; free space, age, least-recently-used, least-frequently-used - are all being considered.

Re: Show HN: Flox 1.0 – Open-source dev env as code with Nix

#49
post #29

Sorry to be this guy, but why is Nix better than a docker dev container?

I have to use both at the same time.

I have a Docker with an old version of centos which for some reason is the one provided to us.

I then create an "overlay" over it using nix, so I can actually use software with newer glibc etc... easily.

Regardless of that, nix is way better than docker, in the sense that docker doesn't ensure reproducibility, you can build a Dockerfile in two different days, and get different versions of packages installed, this is simply not possible with nix, you have complete control over your tools.

And if you decide to port your application to a "nix package", you have complete control over all the dependencies of you application, a reproducible way to build it, and an easy way to deploy it.

Re: Show HN: Flox 1.0 – Open-source dev env as code with Nix

#50
post #36

Would this work as a simpler alternative to Nix home manager?

Yes. For limited situations it provides a simpler interface. Flox won't provide exactly the same feature set, but there are many situations where home-manager is too much.

You can consider the current `flox` environment to be similar to a declarative profile, conceptually positioned between home-manager and devShells.

Post reply on HN