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?
nix-build is essentially a wrapper around nix-instantiate (to translate a high-level Nix expression to a low-level store derivation) and nix-store --realise (to build the store derivation). Warning. The result of the build is automatically registered as a root of the Nix garbage collector.
Description. The command nix-shell will build the dependencies of the specified derivation, but not the derivation itself. It will then start an interactive shell in which all environment variables defined by the derivation path have been set to their corresponding values, and the script $stdenv/setup has been sourced.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With