Search code examples
nix

What does `nix-darwin` provide?


I am new to nix world, and I use Mac OS X. I've just installed nix on my MacBook and want to use nix to manage some packages like Emacs instead of Homebrew.

I've found this repo: https://github.com/LnL7/nix-darwin , and I am curious:

What this repo provides for a Mac user?

Does it provide a way to manage OS X system itself? Or does it provide a way to manage softwares on OS X system?

What does the darwin-rebuild switch do to my system? Is that revertable?


Solution

  • This page includes a nice overview of the different projects in the nix ecosystem https://nixos.wiki/wiki/Nix_Ecosystem, nix-darwin (kind of) takes the place of NixOS on macOS.

    Nix (and nixpkgs) is all you need to install packages. What nix-darwin adds is configuration and service management using the same mechanism as NixOS and it's mostly intended for users that use or know NixOS and want to have some of the same features on a mac.