This repository uses just as a command runner to simplify common Nix and Nix-Darwin tasks. To use the commands, ensure you have just installed:
brew install justRun any of the tasks by executing:
just <task>If you run just with no arguments, it will default to the switch task (see below).
-
build: Builds the Nix-Darwin system configuration for the current host, but does not switch to it.
just build
You can pass a different host or flags if needed:
just build target_host=myhost flags="--option" -
trace: Builds the configuration with the
--show-traceflag for debugging errors.just trace
-
switch: Builds and switches to the new Nix-Darwin configuration for the current host. This is the default when running
justwith no arguments.just switch # or simply just
- gc: Cleans up old generations and runs garbage collection on the Nix store. By default, it keeps the last 5 generations, but you can specify a different number:
just gc just gc generations=10
This helps free up disk space by removing unused packages and system generations.