- Install Nix
Find instructions here. As of writing this, the command is:
curl -L https://nixos.org/nix/install | sh
- Install Nix Darwin
Find instructions here. As of writing this, the command is:
nix run nix-darwin --extra-experimental-features "nix-command flakes" -- switch --flake ~/path/to/flake.nix#<profile>
The path to the flake.nix
file depends on where you have it stored on your machine. The profile is the name of the profile defined in the flake.nix
file. For example, if this is profile you want to use with the flake:
darwinConfigurations."macbook-air" = nix-darwin.lib.darwinSystem {
modules = [ configuration ];
};
Then the profile is macbook-air
.
- Using Nix Darwin
Find instructions here. As of writing this, the command to apply the configuration is:
darwin-rebuild switch --flake ~/path/to/flake/directory#<profile>
To search for packages from nixpkgs
, use the following command:
nix search nixpkgs <package-name>
You can also use the web interface here.