The Quick Setup
I've created a Nix Flakes repository for reproducible SDET environments across Mac, Linux, and Windows (WSL2). To get started:
Step 1: Install Nix (2 minutes)
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
Step 2: Clone and Customize (1 minute)
git clone https://github.com/crashnaut/nix.gitcd nix/mac
git clone https://github.com/crashnaut/nix.gitcd nix/linux
git clone https://github.com/crashnaut/nix.gitcd nix/windows
Edit flake.nix to set your username and hostname, and customize the package list.
Step 3: Apply Configuration (2 minutes)
nix run nix-darwin -- switch --flake .#your-hostname
nix run home-manager/master -- switch --flake .#your-username@your-hostname
nix run home-manager/master -- switch --flake .#your-username@your-hostname
All your tools are now installed and configured.
What's Included
Development Tools
- Git, GitHub CLI, Vim, GPG
- Node.js 22 (LTS) with pnpm package manager
- OrbStack (fast, lightweight Docker alternative, Mac only)
- Postman for poking at APIs
- Language toolchains ready to add
CLI Utilities
- Modern tools:
ripgrep,bat,fd,eza - System monitoring:
htop,btop - Essentials:
curl,wget,jq - Zsh with Oh My Zsh
Personal Apps
The repo also installs a few GUI apps I use day to day (browser, chat, notes). They're personal picks rather than SDET requirements, so strip them out of flake.nix before you apply it.
Daily Workflow
Update Everything
nix flake update
darwin-rebuild switch --flake .
home-manager switch --flake .
Add a Package
- Find it at search.nixos.org
- Add to your
flake.nix - Rebuild
packages = with pkgs; [# ... existing packagesneofetch # New package];
Rollback on Issues
darwin-rebuild switch --rollback
home-manager generationshome-manager switch --switch-generation <number>
SDET Use Cases
Consistent Test Environments
Give your test project its own flake.nix with a devShells output, then use it locally and in CI to eliminate environment drift:
nix develop # interactive shell, same tools everywherenix develop --command npx playwright test # non-interactive, for CI
Quick CI/CD Setup
FROM nixos/nix# Flakes are still behind an experimental flagENV NIX_CONFIG="experimental-features = nix-command flakes"WORKDIR /app# Build the dev shell once so it's cached in an image layerCOPY flake.nix flake.lock ./RUN nix develop --command trueCOPY . .# Run your test command inside the dev shell, non-interactivelyCMD ["nix", "develop", "--command", "npm", "test"]
nix develop on its own opens an interactive shell, which goes nowhere in a RUN step, so always pass --command.
Multi-Platform Testing
Configurations for Mac, Linux, and Windows ensure your automation works everywhere.
Team Onboarding
Three commands instead of a 20-page doc:
curl <install-nix>git clone <your-nix-repo>nix run <platform-command>
Get Started
Check out the repository for platform-specific configurations:
Each includes detailed READMEs with troubleshooting guides.
Quick FAQ
Will this conflict with my existing tools?
No. Nix installs to /nix separately. Uninstall anytime with /nix/nix-installer uninstall.
Disk space needed?
~2GB initially. Use nix-collect-garbage to clean old generations.
Works with Docker?
Yes. OrbStack is included on Mac (faster and lighter than Docker Desktop). Linux uses native Docker.