Skip to content

Commit

Permalink
readme: prevent newcomer pitfall when disabling nix-command
Browse files Browse the repository at this point in the history
Closes #1228
  • Loading branch information
spikespaz authored Dec 17, 2024
1 parent a35b08d commit bad102d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,13 @@ Make sure to set `nixpkgs.hostPlatform` in your `configuration.nix` to either `x
Unlike NixOS, `nix-darwin` does not have an installer, you can just run `darwin-rebuild switch` to install nix-darwin. As `darwin-rebuild` won't be installed in your `PATH` yet, you can use the following command:

```bash
nix run nix-darwin -- switch --flake ~/.config/nix-darwin
nix run --extra-experimental-features nix-command --extra-experimental-features flakes nix-darwin -- switch --flake ~/.config/nix-darwin
```

Remember to back up and remove your `/etc/nix/nix.conf` beforehand. If you forget, you will be reminded.

Since removing `/etc/nix/nix.conf` would disable experimintal features, you must have `--extra-experimental-features nix-command --extra-experimental-features flakes` passed as arguments to `nix run`.

### Step 3. Using `nix-darwin`

After installing, you can run `darwin-rebuild` to apply changes to your system:
Expand Down

0 comments on commit bad102d

Please sign in to comment.