24

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?

cmal
  • 2,062
  • 1
  • 18
  • 35

1 Answers1

20

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.

Tae
  • 1,665
  • 5
  • 24
  • 45
LnL7
  • 388
  • 2
  • 4
  • 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`. – Steven Shaw Oct 09 '19 at 09:17
  • 3
    Just went through all the revisions of the NixOS wiki page and the [github repo](https://github.com/nix-community/wiki), 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 '20 at 19:37
  • `nix-darwin` is mentioned on the [Applications](https://nixos.wiki/wiki/Applications) page of the NixOS wiki. The "Nix Ecosystem" page links to it thus: "In addition there are many other [applications](https://nixos.wiki/wiki/Applications) developed by the Nix community, utilizing and supporting these core technologies." – Kenny Evitt Dec 26 '21 at 19:14