Skip to content

Blog

Git hashes in Nix

While building Amp, I'm often making small, incremental changes in-between official releases. To dogfood these changes during my day-to-day work, I've added the project as a git-based input to my NixOS flake config, allowing me to easily pull those changes into my local installation.

Across various machines, it can be hard to tell which version I'm running. To fix that, I added a "build revision" to the splash screen, showing the shorthand commit hash of the current build:

splash screen

Populating that during Nix-based builds ended up being tricker than I'd thought.

Arch is a gateway drug to NixOS

Most Linux users cut their teeth on a "batteries included" distro. Ubuntu, Fedora, Debian, or an equally easy-to-use option is a common way to get started with Linux.

At some point these distros fall short. You may want to try a tiling window manager or desktop environment that isn't offered out of the box, and while you can shoehorn these in, it eventually becomes easier (and cleaner) to build your system up from a minimal base than it would take to bend a pre-configured distro into shape.

Reflections on Shape Up

Just over 9 months ago, I kicked off a pilot of Shape Up with a cross-functional team of engineers, designers, and product managers. We'd been grappling with challenges around project planning and execution, and Shape Up seemed like it would solve some of our problems.

That turned out to be a great decision for a lot of different reasons.

Understanding Nix

Nix is kind of a weird one. When I first found myself on its webpage, I'd arrived there having clicked something describing it as a functional language, but found myself facing this headline:

Declarative builds and deployments.

The website then went on to talk about Nix as tool, and one that solves package management and system configuration. At this point I've also noticed that I'm on nixos.org, which I've heard about but isn't the domain I expected to be on while digging into a functional language.

Reference iterators in Rust

One thing you've likely noticed when writing Rust is how its ownership system makes heap allocations fairly explicit. One way to avoid these when iterating is to yield references to heap-allocated objects, rather than copies. While simple in theory, this concept can get complex rather quickly in practice.