Show HN: Flox 1.0 – Open-source dev env as code with Nix (opens in a new tab)github.com
382 pointsI'm Ron Efroni, CEO at Flox, and today we are releasing version 1.0 of our open source CLI, helping folks manage development environments everywhere.My own experience with development environments began with air-gapped systems, having to actually burn software to a CD to iterate over a very slow and expensive development cycle, sometimes reaching the server rack and realizing I have the wrong disk.... Fast forward to today and there are countless alternatives available backed by incredible compute resources, yet we somehow still find ourselves paying the price of long development cycles. That's why I've been working for over a decade to simplify the development stack so we can spend more time on making 1's and 0's do magical things, and why my co-founder Michael and I started Flox to bring you the solution based on Nix. Today is just the first step on that journey. We hope you'll take a peek at our new release, and very much look forward to continuing the journey with you from here together!
Introducing Flox 1.0
Flox is a platform that lets developers and operators focus on building fast with reproducible environments that span the enterprise SDLC. Using a declarative framework based on Nix, a package management and configuration tool, Flox allows developers to create environments that contain everything they need to build software.
Why Flox?
Flox behaves a lot like your favorite and familiar package manager, but it allows you to create as many environments as you want on your machine. Each one can contain a different combination of packages.
Environments are portable by default. If you install a package inside one that isn't cross-platform, it's easy to carve out exceptions. It's also easy to write hooks and populate your environment with variables - we designed it to be hackable.
Flox environments run in user-space, like, where you are. When you type `ls` after activating a Flox environment you will see the same stuff because you're in the same place - even with all those new packages available. No mounting volumes, no proxying ports. No breaking into the toolset you just conjured.
Getting Started: No sign-ups, just one install away. Dive into our GitHub repository (https://github.com/flox/flox) and start exploring
I’m around all day to answer questions, talk Nix, or just reminisce about simpler times ;).
Lots of open source love, Ron
Comments (192) 50 threads
Earlier commentsGiven so, this means many tools based on nix provide this too, though it's not as easily surfaced.
I prefer using Fish, but it's not supported. So, I uninstalled it and tried with Bash or Zsh instead.
Even after completely removing Fish from my system, the flow CLI still insists it's there and tries to open a path that no longer exists.
Switching to Zsh gave a different result, but it was still a frustrating experience. While I could activate the flox environment the first time I executed it, exiting caused issues. I had to reactivate it multiple times, encountering errors such as "environment already enabled" before it finally worked properly.
I'm sorry for the negative feedback, but this seems far from a version 1.0 product user experience.
Re: fish, saw you found the issue someone else opened on it. We have it on our plan and will be adding support soon https://github.com/flox/flox/issues/1173
Re: your zsh experience, it's hard to judge exactly what's happening from your comment but we have had other users where the state of activation was suppressed by themes which can cause "environment already active". https://github.com/flox/flox/issues/637 - if you think it's something else or have more detail to share, let us know (either here, github, anywhere).
Thanks for trying Flox!
(Flox employee here)
I like the ideas behind nix and flox, and I ack it's not an easy problem.
I'll keep my eye on the project and check again in the future. GL.
One question: does Flox need Nix preinstalled? I don't see any mention of Nix in the installation guide. If Fkox doesn't need Nix install it would be a huge game changer.
If you have Nix already, you can try it out as described here: https://flox.dev/docs/install-flox/#install-with-existing-ni....
side-note: with further improvements to Nix as a library, it may be possible to make installing Nix not necessary for flox to function, but this is on a longer time horizon... don't hold your breath
If I have some developers using an ARM based macbook, and some devs on an x86_64 based machine, is it easy to support both without much maintenance?
But in practice it's really easy. Though if you're all into robustness you should probably test on the same arch you deploy to eventually.
Those packages are built from the same sources with same (or almost the same) configuration options and for all intents and purposes should be nearly identical.
So while you use your devenv, it will download and use the right packages for your architecture, and if something is missing on the cache server it will build it locally.
Now as ARM Mac's are as popular as the intel ones, people are making sure that the packages build on both.
[1] nix generates a hash which is based on the package source code, compile options, architecture etc. and uses that for the lookup.
Yes.
I maintain a small collection of Nix packages at my job (some of which come straight from upstream, some of which I've written in-house and are out-of-tree) for use in development and CI environments. We currently support both Intel and Apple Silicon Macs as well as x86_64 Linux environments.
There are a couple of small OS-specific tweaks in one or two packages (which we inherit from those packages, which ship OS-specific scripts). There is no architecture-specific code in the repo; I literally never have to think about it.
Target platforms are all tested in CI. Deployment targets (users, CI runners) on all supported platforms get the exact same versions of everything, in binary form appropriate to their architecture.
All comments shown.
Couldn't load more comments. Check your connection and try again.