| title | Getting Started |
|---|---|
| description | Tutorial for setting up this Nix configuration on a new machine |
| type | tutorial |
| audience | both |
| last-reviewed | 2026-04-06 |
This tutorial walks you through setting up this Nix configuration on a new machine. By the end, you'll have a fully configured development environment.
- How to install Nix with flakes
- How to apply this configuration to your machine
- How to verify everything works
- A macOS (Apple Silicon) or Linux (x86_64) machine
- Terminal access
- About 30 minutes
If you don't have Nix installed, use the Determinate Systems installer:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- installRestart your terminal after installation.
Verify Nix is working:
nix --versionYou should see output like nix (Nix) 2.x.x.
git clone https://github.com/funkymonkeymonk/nix.git
cd nixnix developThis may take a few minutes the first time as it downloads dependencies. When complete, you'll be in a shell with all development tools available.
List the available system configurations:
# For macOS
nix flake show | grep darwinConfigurations
# For NixOS
nix flake show | grep nixosConfigurationsYou'll see configurations like wweaver, MegamanX, and zero.
For a new machine, you'll need to create a target. For now, let's test with the core configuration which provides minimal tooling.
# Build and apply the core configuration
nix build .#darwinConfigurations.core.system
./result/sw/bin/darwin-rebuild switch --flake .#coreNixOS requires hardware-specific configuration. See the Add a New Machine guide for detailed steps.
After applying the configuration:
# Check that devenv is available
devenv --version
# List available tasks
devenv tasks listYou should see a list of available tasks like check:lint, build:darwin, etc.
Verify your configuration is healthy:
devenv tasks run check:lintThis runs fast lint checks (~30 seconds).
Now that you have the basics working:
- Customize your setup: See Add a New Machine to create a personalized configuration
- Understand the architecture: Read Architecture to learn how modules, bundles, and roles work
- Explore available roles: Check Roles Reference for available package bundles
Add this to ~/.config/nix/nix.conf:
experimental-features = nix-command flakes
First builds download many packages. Subsequent builds use the cache and are much faster.
On macOS, you may need to run:
sudo chown -R $(whoami) /nixFor more troubleshooting help, see the reference documentation or check existing issues in the repository.