HNHacker News
TopNewBestAskShowJobs

grhmc

2,440 karma · joined February 23, 2014

submissionscomments
grhmc··on Show HN: fh, the FlakeHub CLI
Hey HN, after we launched FlakeHub last week, a common question was: what about the CLI? We heard you loud and clear, and here's a scrappy first pass at a useful fh CLI tool.

It supports searching and adding inputs to your flake, plus a few other things. In the future, it'll do more -- like publishing.

I'll be here to answer questions, but what would you like to see it do?

grhmc··on Show HN: Flake schemas – teaching Nix about your flake outputs
I totally agree. This is one of the reasons we made FlakeHub, to make a better update mechanism that was flexible and supported things that aren't just github as sources. I think that'll happen, it'll just take a bit of time, and likely experimenting outside of nix before patches land upstream.
grhmc··on Show HN: Flake schemas – teaching Nix about your flake outputs
Thank you, you're welcome! I think those tools are interesting, but a crutch / tape over difficulties that Nix presents. I think that tools that try to hide a bad experience with another layer often presents more problems in surprising ways that sometimes leaves users with no option but to undo all their hard work and start over. We did a similar experiment last year with Riff, but haven't paid it much attention because of the layering problem. Our focus is making Nix and flakes themselves the best tool for the job.
grhmc··on Show HN: Flake schemas – teaching Nix about your flake outputs
I hope there will be, but I'm not really sure. I think the future of Nix is in smaller, focused flakes being shared and exchanged. People dunk on projects like Rust and Node for having infinity dependencies, but it is that way because those ecosystems have rich library ecosystems that are worth using. I see the same thing happening in Nix.
grhmc··on Show HN: Flake schemas – teaching Nix about your flake outputs
This is a deeper cut of pretty foundational stuff. Almost no user will need to actually interact with schemas, and instead will use schemas provided by other folks. In other words, if this doesn't make sense: don't worry, you don't need to know about it :).

The tl;dr, though:

* nix flake show and other tools only knew about very specific types of things you might put in a flake.

* with flake-schemas, that limitation is lifted and people can do more creative things.

grhmc··on Show HN: Flake schemas – teaching Nix about your flake outputs
Hey folks, this is Graham -- CEO of DetSys. Happy to help answer any questions!
grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
Very cool!

You can get nixpkgs unstable like this:

    nixpkgs-unstable.url = "https://flakehub.com/f/NixOS/nixpkgs/1.*.tar.gz";
grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
These are indeed valid concerns, and I think that it’s fair for the community to be vigilant about such things and to ask probing questions. But my perspective is both:

- Nothing we’re doing is inherently proprietary or "secret sauce". FlakeHub isn’t doing anything magical, and the version solving feature would be better if Nix did it itself.

- Also, proprietary services can serve important functions in OSS communities. They can expand the user base significantly (like GitHub to Git) and they can send signals to maintainers of official tools about what’s a hit and what’s a dud. And I think that that’s precisely what we’re doing not just with FlakeHub but also with the Determinate Nix Installer, the Magic Nix Cache, the Flake Checker, and others.

grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
It's a tradition in the NixOS ecosystem, like nixos.com. (drat.)
grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
My feeling is we’ve been careful and considered about what we build and why, though I understand some folks don’t like what we’ve made. That’s their right, just like it is our right to build things we think are important and add value to the Nix community. We’re not in charge of the Nix project: Nix has its own governance and processes that we also engage with.

Most of our tools are open source, totally free, and don’t depend on us as a company continuing to exist. In many cases I hope the Nix project wants to adopt and take over some of our work — like the installer.

Our goal is to make Nix as good as possible, and do it together. In the meantime, it’s okay to not use our tools :)

grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
We strongly value open source software through and through, and have a team of long term contributors to open-source projects and communities. Part of open source is being allowed to build and experiment and see what happens. I find it unfortunate that people respond so strongly to our work, but I think part of it is a bit of fear of the unknown. We’ve published a lot of tools that we think are really nice, and almost all of them are totally open source and free (though the flakehub.com backend currently is not). Hopefully in the end the proof is in the pudding.
grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
I know folks have anxieties about commercial investment, and anxieties about developing flakes. Whenever we hit bugs in flakes, we go work upstream to fix them. We do this rather often :).

I won't try to persuade you one way or another on commercial investment other than it is here with or without DetSys, and we've released a rather large suite of tools to make using Nix more pleasant and all but one (flakehub's backend) is free and open source. I feel that is a good way to go!

I also think developing features and improvements to Nix outside of it is a good way to prove out ideas that can be eventually merged in to core. We don't _want_ to be solving the version on the server, but I'm rather sure it would have taken months if not years to get an experiment merged. And for good reason: we all want to make sure what goes in to Nix is solid.

grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
That's largely right. Getting semver version solving into Nix core itself is a goal of ours. FlakeHub implements it server-side because landing it in Nix without proving it out conceptually would be really hard, and also -- in my opinion -- reckless. Trying these things out in the world without committing the project to it long term is a good thing.
grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
I'm so glad you think so! We sure agree :). We're hoping this mechanism helps get some predictability, like that all the platforms that are listed fully evaluate as expected.
grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
In our opinion, flakes are the future of Nix and we're doing the hard work of using them extensively everywhere we can. While we do that, we fix bugs and papercuts along the way. I don't think flakes _can_ meaningfully stabilize without people pushing them to their boundaries and then addressing the problems that come up.

In other words, yes: we are doubling down because we don't see a future of Nix where flakes or something like them aren't central.

grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
I just posted a reply on Discourse (https://discourse.nixos.org/t/introducing-flakehub/32044/14?...) but for posterity:

I’m sorry some folks aren’t excited about FlakeHub, but that is okay. We’ve made it because it solves real problems we’ve experienced, and I think it is going to make a big difference in the community. We’re all contributing to the project in the ways we want to, and this is an example of that.

We see flakes as the future of Nix, and we’re unabashedly working to make that true. One way we’re doing that is using flakes extensively every day and exposing ourselves to the bugs, papercuts, and pain points. We often deeply research and resolve these problems upstream, without fanfare or posting on Discourse.

I think we have the common goal of growing and improving Nix, and we’re glad to be doing it together. We would love to see a continuation of RFC-144 accepted into Nix upstream. The version resolving feature of FlakeHub is a bandaid that works until the upstream project has a comparable feature. In my opinion, it is a good thing to do experiments like this without committing the entire project to it.

grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
Thanks for sharing! We'll take a look. If nothing else, I'm sure you'll be able to publish using a CLI + token. Thanks!
grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
Yep, that should work! Give it a try and let us know how it goes. Come join us on Discord, we'd be glad to chat about it.
grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
We don't have one yet, but watch for one in the coming weeks. The CLI we're putting together allows for searching and adding to your flake.

You can search on the web UI, though: https://flakehub.com/search

grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
Yeah, thanks. We only support GitHub Actions because of the authentication model it offer with JWTs. We're planning on expanding to support other forges, and eventually local publishing, too.

In the meantime, you could use a GitHub action to clone your repository from another forge and publish it, if you wanted to.

grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
Good question. Publishing to FlakeHub makes an archive of the release, checks to make sure it evaluates cleanly in isolation, and publishes it to FlakeHub's storage.

This is to make sure that releases stay available in the long term, even through GitHub account renames or repository deletions.

grhmc··on FlakeHub - Discover and publish Nix flakes
Hey HN, glad to see FlakeHub posted so eagerly! I have another thread over here: https://news.ycombinator.com/item?id=37224148

We built FlakeHub to bring SemVer and a crates.io-like experience to Nix and flakes. Please check it out and let us know what you think. We'll be watching!

grhmc··on Show HN: FlakeHub – Discover and publish Nix flakes
Hey folks, Graham -- CEO of DetSys here. So glad to be able to share FlakeHub, our most ambitious project yet.

FlakeHub brings a crates.io-like experience to Nix and flakes, with semver releases and publish-time checks to make sure the flake is easily distributable.

Check it out, let us know what you think! I'll be here answering questions all day.

grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
It is great to hear about your work in the space!

Several years ago I looked at implementing a custom component for k8s which would exchange nix store paths instead of containers, substitute, and bind mount them in at run time. It was an interesting experiment, but was Quite Difficult to pull off for someone who wasn't already familiar with k8s.

I've seen some projects similar to what you're describing though: the lightning-fast substitutions. It was incredible! They had the benefit of a fabulously fat network connection, though, and I'm not sure the experience translates very well. We will see!

grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
"It depends." poetry2nix is pretty good! Generally, exporting to an OCI image, or targeting a production environment that can run Nix closures natively is the way we go about it. Many of our services use buildLayeredImage[0] and target Fly.io.

0: https://grahamc.com/blog/nix-and-layered-docker-images/

grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
Yep, that works great for cases where you trust all your contributors. We do the same for some projects internally, too. However, for public projects where you don't it gets a bit ... dicier. Glad to hear that's working for you!
grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
Great question. Yes. Anything that Nix builds during your workflow will get cached. Give it a try and let me know how it goes?
grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
Nice! Yeah, we're obviously big fans of NixOS over here :). In cases where build infrastructure is highly ephemeral, this sort of cache would make a lot of sense. We'd love to help get it working there!
grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
I'm not sure... want to open a ticket? :)
grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
Check out https://zero-to-nix.com/concepts/closures and https://zero-to-nix.com/concepts/realisation, which I think add more color to this (and also is largely authored by biggestlou here.)
← PreviousPage 3 of 10Next →