Skip to content

Nix

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.

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.