HNHacker News
TopNewBestAskShowJobs

grhmc

2,440 karma · joined February 23, 2014

submissionscomments
grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
Nix's design gives good guarantees about reproducibility. It may not be bit-perfect, but in general it is _very_ good. Maybe the Zero to Nix article on Caching, and its linked pages will help? https://zero-to-nix.com/concepts/caching

The long and short of it is a merkle tree of hashed inputs :).

grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
One project cut their CI time from 18m to 3m: https://github.com/awkward-squad/hasql-interpolate/actions. I wonder who will see the biggest cut!

Note that when PRs merge to the default branch, their cache doesn't come with them. This is how GitHub Action's cache works, as a security measure. However: subsequent rebuilds will, and PRs off the default branch will too.

grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
I think it should be pretty straightforward to make the Magic Nix Cache work on GitLab, too. They have a similar caching API. We'll take a look!
grhmc··on The Magic Nix Cache, a GitHub Action for speeding up your Nix workflows
Graham Christensen here, cofounder of DetSys. Happy to answer any questions! The Magic Nix Cache has been a huge boon to us internally, and we're really excited to share it with the world today.
grhmc··on The Determinate Nix Installer
I certainly feel that way.
grhmc··on The Determinate Nix Installer
I'm delighted to see your edit :). Our installer makes a few configuration choices that upstream doesn't, but the main driving goal for us is to be reliable, safe, and easy to undo.
grhmc··on The Determinate Nix Installer
This is such a good summary of all the issues we've been running into over and over, and part of the deep motivations of our work here.
grhmc··on The Determinate Nix Installer
I commented elsewhere in the thread, but we have an open issue for SELinux support: https://github.com/DeterminateSystems/nix-installer/issues/1.... Hopefully we can get that rolling soon.
grhmc··on The Determinate Nix Installer
Thanks! The end result is not quite the same. For example, we turn on flakes, nix-command, and make a couple other minor tweaks to the Nix configuration to make what we think are user-friendly improvements. For example: https://github.com/DeterminateSystems/nix-installer/blob/mai...

Our installer also supports some environments that the upstream installer has a harder time with.

The new installer can't _yet_ uninstall a Nix installed from the upstream installer, but our upcoming work on "curing" will bring that.

grhmc··on The Determinate Nix Installer
I wonder if you've tried our installer? Part of its reason for existing is the ability to safely / completely uninstall.
grhmc··on The Determinate Nix Installer
Thanks for calling that out. Our installer (and the upstream installer) don't support SELinux yet, but there is work in that direction. Here's our tracking issue: https://github.com/DeterminateSystems/nix-installer/issues/1... and there is an upstream Nix issue, too: https://github.com/NixOS/nix/issues/7850.
grhmc··on The Determinate Nix Installer
I'd recommend:

1. Start learning with https://zero-to-nix.com/

2. Take a look at https://github.com/nix-community/home-manager

Good luck!

grhmc··on The Determinate Nix Installer
I've seen some of those changes from DavHau before, they're good! We've also been looking at the statically built version of Nix which is good for "single user" / home-directory-managed installs of Nix. It's a great idea and simplifies the onboarding a good bit. And, it adds some extra behavior which is a little weird. It also doesn't work on macOS, and we're hoping to nail down a (mostly...) consistent experience across the three.

No, it can't be used that way on NixOS, but we could put something out that sets up a similar experience on NixOS! Good idea!

grhmc··on The Determinate Nix Installer
We're working on broadening the use-cases that Nix is appropriate for. Things like https://zero-to-nix.com/, https://www.riff.sh/, and the Determinate Nix Installer's goal is to make installing Nix a "low cost" / "low risk" activity to bring people in.

We're always looking for good writers, Rust devs, and security folks. People who are in to these things should reach out with their resume: careers@determinate.systems. Note that existing Nix expertise is not required.

grhmc··on The Determinate Nix Installer
Whew, let's go.

On NixOS: I generally agree, though it can be tricky to get that done with NixOS. I bet we can make some inroads there.

Easy questions:

> idempotent

It isn't currently idempotent, but we're working on "curing" which brings some idempotency to it, and allows for "rescuing" installations that aren't working correctly. Curing will also support creating a JSON document for installs that don't already have one.

> profitable company or just a group of Nix believers

We are a for-profit company, and we are a group of Nix believers :).

Bash:

Bash is really hard to get right, and really hard to make fast, and really hard to extend its featureset to more complicated use cases. We could "just" download a bash, but when we're trying to navigate disk encryption and APFS volumes and mounts ... it is quite a lot easier to write and test that code in a "bigger" language.

Also note that it isn't just Bash that we'd need to download, but coreutils and other utilities that Bash is really built on top of. We tried to fix a pretty simple bug last year in the Bash installer, and it took two weeks to validate a relatively straightforward, one line change was valid on all the platforms we target.

grhmc··on The Determinate Nix Installer
Graham here, CEO of DetSys. I'd be happy to answer any questions I can about the new installer and what we're up to!
grhmc··on Zero to Nix, an unofficial, opinionated, gentle introduction to Nix
Yep!
grhmc··on Zero to Nix, an unofficial, opinionated, gentle introduction to Nix
Indeed, "zero to nix" was our jokey "working name." We never actually came up with a better name, so here we are :).
grhmc··on Zero to Nix, an unofficial, opinionated, gentle introduction to Nix
It is: using Flakes you're thrusted into a more pure evaluation mode by default, and it creates a (standard) artifact of the revision you're on: the flake.lock.

You can get almost all the benefits Flakes brings without Flakes using alternatives like niv.

grhmc··on Zero to Nix, an unofficial, opinionated, gentle introduction to Nix
Thanks for this. Our goal is to keep people on the "rails" of the quick start, with the Concepts as a way to fill out knowledge people are curious about. I wonder if we should downplay the concept docs in service of that? Or put more CTA's to go take the quickstart?
grhmc··on Zero to Nix, an unofficial, opinionated, gentle introduction to Nix
You can actually put your NixOS config anywhere. Assuming you're not using flakes, `nixos-rebuild` finds the config through NIX_PATH:

grahamc@scruffy:~/ > echo $NIX_PATH

nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels

you can change the `nixos-config` value to point to somewhere else, or call it like this:`nixos-rebuild -I nixos-config=./configuration.nix`

grhmc··on Zero to Nix, an unofficial, opinionated, gentle introduction to Nix
We've been tossing the idea back and forth inside to try and find the right way to approach it. I totally agree.
grhmc··on Zero to Nix, an unofficial, opinionated, gentle introduction to Nix
Thank you =)! I'm really happy to hear that the work we're doing is landing with you.
grhmc··on Zero to Nix, an unofficial, opinionated, gentle introduction to Nix
They do, and using the installer we recommend enables Flakes and the Nix command out of the box: https://zero-to-nix.com/start/install#up.

We think flakes and the new interface are the future, and we're working to bring it home.

grhmc··on Zero to Nix, an unofficial, opinionated, gentle introduction to Nix
Thanks, Jorge! I think the nix3 interface and the Flakes solve a lot of UX problems. Maybe we could do a bit of a user study, to see where you get hung up?
grhmc··on Riff, automatically provide external dependencies for Rust projects
Riff has an internal registry mapping crates to external dependencies. However, the registry is intended to bootstrap Riff's utility. If projects define their own Riff metadata in their own Cargo.toml, that data is preferred. The README shows how to do that: https://github.com/determinateSystems/riff#how-to-declare-pa...
grhmc··on Riff, automatically provide external dependencies for Rust projects
What do you mean about when a wrapper tool "does this"? Riff doesn't install its own Nix.
grhmc··on Riff, automatically provide external dependencies for Rust projects
It could be a Cargo plugin, and we looked at doing that. There may also be some neat tricks around build.rs integration.

However, we decided to wait on those. After all: it only supports rust today, but we're eyeing a future where we support Go + Javascript too. We want Riff to work relatively consistently across these ecosystems.

grhmc··on Riff, automatically provide external dependencies for Rust projects
I think there is a lot of fertile ground in the area we're researching here. I'd be into talking more about where we can go, and how Nix is behind it.
grhmc··on We want to make Nix better
There may be, but at least one BigCorp deploys Nix to a different prefix.
← PreviousPage 4 of 10Next →