Live data from Hacker News

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

github.com

131–140 of 201 posts

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

#132
post #73

The line about nix making it easier for newcomers in the readme and similar statements always trigger me. I am quite a competent person and I've never once thought "that was easy" when trying to use nix. I adore the concepts of nix, but the user experience is awful. Maybe that's what this tool solves? It takes a frustrating amount of effort and incessant config tweaking with little to no documentation and navigating…

I think once somebody solves the hellish configuration with another language that people can actually understand NixOs will take off. I mean, I hate js as much as everybody else, but I’d rather use that to configure nix than whatever that thing is that they use now.

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

#134
post #122

Earlier quoted context omitted.

I just gave that link to someone else who commented here. :) You are right, but at the end of the day, I prefer to write my own installation scripts or "features" than dealing with Nix. Maybe some day I'll go back to a nix tool to help writing a complex devcontainer.json with everything I need.

https://news.ycombinator.com/item?id=39697259 "But there are hoards more that think you should just write hacky shell scripts and bugs don't really matter anyway."

Ah! I was able to open the link in a proper browser. I'm using HACK on iOS.

Thanks for the condescending comment.

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

#135

How does nix deal with different CPU architectures? 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?

One way of thinking about Nix is like A Makefile on steroids. It will build what is needed for the right platform. It is also smart enough that you can add cache server and when it needs something that already is in the cache[1] it will download and use binary package seamlessly.

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.

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

#136
post #39
post #16

Earlier quoted context omitted.

I just want clean, repeatable environments for different projects. I’ve tried getting into Nix a few times but I always get overwhelmed by all the different things it is/does. This looks 100x simpler to me.

Hmm... I understand that if you don't know anything about the language or what is a flake, it may be a little bit difficult. But really, adding a new package to your environment once you have a flake setup, which a minimal one is trivial, is just adding the name of the package. Here you have a flake.nix example from leptos. https://github.com/leptos-rs/leptos/blob/main/flake.nix You want a new dependency? Add it to b…

Respectfully, I'd like to nominate "Heck, even if you want it more easy, you could write a tool in less than 100 lines that adds packages names to .json/.yaml/.toml, which allows you to parse it using the nix language and a simple cli written with bash functions to add/remove packages if you wanted." as the next "why would you need dropbox" comment ( https://news.ycombinator.com/item?id=9224 ).

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

#137

What made you choose the GPL license for this?

Thanks for pointing it out, it made me look closer at it.

I normally would actually welcome GPL, because it allows to keep project being open source.

Though looks like project also comes with CLA where anyone who contributes surrenders their copyright to FloxDev, Inc.

What this means, is that no one can fork it and make from it a commercial product. Many would say this is great as it can keep the project open source, except the CLA gives FloxDev, Inc. option to change license at any moment to whatever they want, including making the project fully closed source.

I don't think such project can be called open source. It feels like a Trojan horse to fool developers (kind of what Hashicorp did). I mean it is the right, but if you're contributing to it, you're not contributing to Open Source project but volunteering free work to another company.

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

#138
What I desperately want is the generation of a lock file so that environment installs are cryptographically guaranteed to be repeatable byte-for-byte. I recognize that this means either checksums every platform supported, but I’ve been startled that none of the options I’ve found seem to have the capacity for this.

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

#139

Last I tried to use Nix there was lots of confusion over flakes - some tutorials suggested using them and others saying they are still in development. Has the situation improved?

I don’t know anyone who is recommending against flakes these days. The “experimental” label is more about the API stability than completeness, bugginess, or anything else.

There are certain scenarios where the performance can be problematic, but there are workarounds and permanent solutions are being worked on. Nevertheless, using flakes extensively at home and work.

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

#140

What I desperately want is the generation of a lock file so that environment installs are cryptographically guaranteed to be repeatable byte-for-byte. I recognize that this means either checksums every platform supported, but I’ve been startled that none of the options I’ve found seem to have the capacity for this.

I think you're looking for Nix flakes proper! This is one of the promises!

Given so, this means many tools based on nix provide this too, though it's not as easily surfaced.

Post reply on HN