25

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?

1 Answer 1

21

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.

3
  • 3
    So it's mostly for services like postgresql, redis, rabbitmq, and such? That sounds good to me because I can install those on macOS with Nix but they do not start. Note that the "Nix Ecosystem" wiki page (no longer?) mentions nix-darwin. Oct 9, 2019 at 9:17
  • 3
    Just went through all the revisions of the NixOS wiki page and the github repo, and couldn't find this great description - nor find a clue as to why nix-darwin is not mentioned anywhere or in the Nix* manuals. Thank you LnL7 for this (and for the tools itself)!
    – toraritte
    Jun 14, 2020 at 19:37
  • nix-darwin is mentioned on the Applications page of the NixOS wiki. The "Nix Ecosystem" page links to it thus: "In addition there are many other applications developed by the Nix community, utilizing and supporting these core technologies." Dec 26, 2021 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.