Thoughts and Writeups

by Davis Haupt

In part one of this series we installed Nix, set up our system configuration with nix-darwin, and installed some packages at the system level. In this post, we’ll set up home-manager.

Unlike nix-darwin, home-manager is cross-platform: it works across NixOS, macOS, and anywhere else Nix can be installed. It was difficult at first for me to understand how home-manager and nix-darwin should interact. While there is definitely overlap with what these two Nix libraries can do, nix-darwin is used for managing system-wide settings and applications: it brings the power of NixOS to the Mac. home-manager on the other hand is most useful for managing user-level configuration and dotfiles.

By the end of this post we’ll have installed home-manager and used it to set up configuration for vim, zsh, and git.

Read More...

I think Nix is really cool. Nix the package manager and functional configuration language is most often associated with NixOS the Linux distro, but nix-darwin makes it almost as easy to declaratively configure macOS as it is to configure NixOS installations. Even if you’ll still relying on Homebrew for package management and never touch nixpkgs, I’d say that Nix with nix-darwin provides the best way to manage packages and system configuration on macOS.

Unfortunately, the resources for getting started and integrating different parts of the Nix ecosystem are not particularly approachable for beginners. When I started out I would often use GitHub’s code search to trawl through other people’s configs and try different snippets until I found what actually worked. Inspired by Arne Bahlo’s Emacs from Scratch series, I wanted to create a guide to help folks get started with Nix on macOS from scratch, step by step.

Throughout this series we’ll create a declarative system configuration with Nix where you can manage anything from your shell aliases to what VSCode extensions you have installed to running daemons with launchd. We’ll build up to this incrementally: by the end of this post, you’ll have Nix installed on your system and be able to declaratively install system-level packages from either Nixpkgs or Homebrew.

Read More...

What I Like About Nix

Dec 12 2023

I got a new computer recently and decided to take the plunge setting it up with Nix1. I wrote up a snippet on how I set everything up and you can find my whole configuration on GitHub. I’ve only scratched the surface of what Nix can do – In this post I wanted to focus on my subjective impression of Nix so far and why I feel I’ve been enjoying it.

Read More...

Honing Your Craft

May 21 2023

Pablo Picasso was one of the most famous modern artists of the 20th century. While many of his paintings border on the abstract, he sharpened his artisitc skill on more realistic and traditional styles. Novelty and creativity are important parts of great art, but just as necessary to making anything great is the technical ability to take an idea and represent it in the real world — even abstract expressionists could paint unbelieveably realistic landscapes if they felt the need.

I’m certainly no artist, but the lesson here applies more broadly: practicing technical skills on their own is an important part of the creative process.

Read More...

This is my generative AI take. I’m sure there are many like it, but this one is mine.

When it comes to social trends I’m often on the far side of Moore’s Chasm. I signed up for Snapchat a year after all of my friends, and joined Instagram two years after everyone else. So it was only appropriate that it took weeks after the internet was set on fire for me to see the value that applications of Large Language Models like ChatGPT and GitHub Copilot bring to programming. But now that I’ve given it a real shot, it’s clear to me that if you have enough knowledge to ask specific tactical questions about a well-defined technology, framework or library, ChatGPT can be a huge force multiplier.

Read More...