Nix As An Installer
Been using Homebrew forever and its awesome. Google should totally give him a job. Recently I thought I’d see what the fuss over Nix is all about though. My needs are simple: I want to install and uninstall software on my Mac. It would be nice to have a list of apps I use that I can check into git if I feel like it, but that’s just a nice-to-have.
First I tried out vanilla nix (the package manager, not the OS), then home-manager, then home-manager with flakes. I landed on nix plus flakes, no home-manager, plus some wrapper scripts to make it stupid easy to use…I don’t need all the knobs.
Now I’ve got
nin <package> for installing software. It accepts
packages in the format
github:bobhope/mpv. Or if I type
nin alone it installs
all the packages I’ve got listed in ~/.config/nix/nin.conf.
nun <package> for removing packages. And finally
nup to upgrade all the installed packages. Whenever I add or
remove a package, my config gets updated to reflect that, so I can
check my config aka my list of apps into source control if I want.
So far, so good. It’s pretty fast and install, uninstall, and upgrades are all super easy.