Nix setup for my working (mac/) and gaming (pc/) computers.
Starting from a fresh macOS computer:
Use the Determinate Systems installer — it handles the APFS volume creation, survives macOS updates, and ships an uninstaller:
curl -fsSL https://install.determinate.systems/nix | sh -s -- installOpen a new terminal afterwards so the shell picks up the Nix environment.
Clone this repo and install the mac/ environment into the user profile:
git clone https://github.com/larry0x/nix.git ~/workspace/larry0x/nix
cd ~/workspace/larry0x/nix
nix profile add .Among everything else, this provides the Nix tooling used to work on this repo:
nixd: language server — completion, hover docs, and diagnostics for NixOS optionsnixfmt: the official formatterstatix: lints for Nix anti-patternsdeadnix: finds dead code, such as unused bindings and lambda arguments
Install the Nix IDE extension — the exact identifier is jnoortheen.nix-ide, beware of lookalikes — and point it at nixd in settings.json:
{
"nix.enableLanguageServer": true,
"nix.serverPath": "/Users/<you>/.nix-profile/bin/nixd"
}just fmt
just lint
just test