docs/readme: add darwin installation guide

This commit is contained in:
Guanran Wang 2024-02-26 13:15:41 +08:00
parent 89a2718c9f
commit 37b6537448
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8

View file

@ -40,3 +40,20 @@ Please don't.
3. Install NixOS
`$ nixos-install --flake <this flake's directory>#<hostname>`
### macOS:
1. Install Nix using [`Determinate Nix Installer`](https://github.com/DeterminateSystems/nix-installer)
`$ curl --proto '=https' --tlsv1.2 -fsSL https://install.determinate.systems/nix | sh -s -- install`
2. Clone this repository
`$ git clone https://github.com/Guanran928/flake.git`
3. Add your device's hardware configuration in `./flake.nix` and
`./hosts/<hostname>`
4. Install [`nix-darwin`](https://github.com/LnL7/nix-darwin?tab=readme-ov-file#flakes)
`nix run nix-darwin -- switch --flake <this flake's directory>#<hostname>`