Skip to content

Commit

Permalink
Merge pull request #1157 from Enzime/read-me
Browse files Browse the repository at this point in the history
readme: small improvements
  • Loading branch information
emilazy authored Nov 9, 2024
2 parents 5e9e8e7 + 5a1ae6a commit 5c74ab8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@

# nix-darwin

![Test](https://github.com/LnL7/nix-darwin/workflows/Test/badge.svg)
[![Test](https://github.com/LnL7/nix-darwin/actions/workflows/test.yml/badge.svg)](https://github.com/LnL7/nix-darwin/actions/workflows/test.yml)

Nix modules for darwin, `/etc/nixos/configuration.nix` for macOS.

This project aims to bring the convenience of a declarative system approach to macOS.
nix-darwin is built up around [Nixpkgs](https://github.com/NixOS/nixpkgs), quite similar to [NixOS](https://nixos.org/).

## Installing
## Prerequisites

The only prerequisite is a Nix implementation, both Nix and Lix are supported.

To install nix-darwin, a working installation of [Nix](https://github.com/NixOS/nix#installation) is required.
As the official Nix installer does not include an automated uninstaller, and manual uninstallation on macOS is a complex process, we recommend using one of the following installers instead:

- The [Nix installer from Determinate Systems](https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#determinate-nix-installer) is only recommended for use with flake-based setups. **Make sure you use it without the `--determinate` flag**. The `--determinate` flag installs the Determinate Nix distribution which does not work out of the box with nix-darwin.
* The [Lix installer](https://lix.systems/install/#on-any-other-linuxmacos-system) supports both flake-based and channel-based setups.

## Installing

If you wish to use nix-darwin with flakes, please refer to the [flakes](#flakes) section.

Expand All @@ -20,13 +27,6 @@ nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
./result/bin/darwin-installer
```

> NOTE: the system activation scripts don't overwrite existing etc files, so files like `/etc/bashrc` and `/etc/zshrc` won't be
> updated by default. If you didn't use the installer or skipped some of the options you'll have to take care of this yourself.
> Either modify the existing file to source/import the one from `/etc/static` or remove it. Some examples:
- `mv /etc/bashrc /etc/bashrc.before-nix-darwin`
- `echo 'if test -e /etc/static/bashrc; then . /etc/static/bashrc; fi' | sudo tee -a /etc/bashrc`

## Updating

The installer will configure a channel for this repository.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/darwin-installer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ stdenv.mkDerivation {
echo >&2 " Open '$config' to get started."
echo >&2 " See the README for more information: https://github.com/LnL7/nix-darwin/blob/master/README.md"
echo >&2
echo >&2 " Don't forget to start a new shell or source /etc/static/bashrc."
echo >&2 " Please log out and log in again to make sure nix-darwin is properly loaded."
echo >&2
exit
'';
Expand Down

0 comments on commit 5c74ab8

Please sign in to comment.