Note
Note that this blog currently acts as a reference for me. It is not a comprehensive guide on why and how to use Nix on macOS.
I chose nix because I am tired of Homebrew’s slowness and NOT PROVIDING BOTTLES (BINARY) FOR OLD MACOS VERSIONS.
Install
I am not using the official installer because it cannot survive macOS updates. Instead, I am using the Determinate System’s Nix Installer.
|
|
Pin Nixpkgs
I don’t want to download a tarball and extract it every now and then. I know you can set tarball-ttl to a higher value, but I don’t want to do that either. Just pin nixpkgs.
|
|
If you are like me in China, you may want to use a mirror.
|
|
Using
I wrote some scripts just to make my life easier.
Later Steps
There is nix-darwin to make declarative configuration easier. I don’t have time to try it yet but I will definitely give it a try when I have time.