Fast SDET Setup with Nix Flakes

The Problem: Machine Setup Shouldn't Take Hours link
As an SDET how many times have you had to set up a new machine? Whether it's a new laptop, a CI runner, or helping a teammate get started, the process is painful:
- Installing dozens of tools individually
- Tracking down the right versions
- Configuring each tool properly
- Documenting the process (that inevitably gets outdated)
- Dealing with "it works on my machine" issues
What if you could go from a fresh machine to a fully configured development environment in 5 minutes?
The Solution: Nix Flakes link
I've created a Nix Flakes repository that provides reproducible development environments across Mac, Linux, and Windows (WSL2). The entire setup is declarative, version-controlled, and atomic.
Why Nix Flakes? link
Declarative Configuration: Your entire environment is defined in a single flake.nix
file. Want to know what's installed? Just read the file.
Reproducible: The same configuration produces the same result every time, on every machine. No more "it worked yesterday" mysteries.
Atomic Updates: Changes either succeed completely or rollback automatically. No more broken environments from partial updates.
Cross-Platform: The same approach works on Mac, Linux, and Windows (via WSL2).
Version Control: Your environment configuration is just code. Track changes, branch, and merge like any other codebase.
What's Included link
The repository includes platform-specific configurations for:
Development Tools link
- Git, GitHub CLI, Vim
- Docker/OrbStack
- Language-specific toolchains (Node, Python, etc.)
CLI Utilities link
- Modern replacements:
ripgrep
,bat
,fd
,eza
- System monitoring:
htop
,btop
- Essential tools:
curl
,wget
,jq
- Zsh with Oh My Zsh
GUI Applications (Mac/Linux) link
- Browsers: Brave, Firefox
- Communication: Slack, Telegram, WhatsApp
- Productivity: Logseq, Postman, Obsidian
- Cloud: Dropbox
All customizable to your needs!
The 5-Minute Setup link
Step 1: Install Nix (2 minutes) link
This installs Nix using the Determinate Systems installer, which provides a better experience than the official installer.
Step 2: Clone and Customize (1 minute) link
Edit the flake.nix
file to customize:
- Your username
- Your hostname
- Packages you want to include/exclude
Step 3: Apply the Configuration (2 minutes) link
That's it! All your tools and applications are now installed and configured.
Real-World Benefits for SDETs link
Consistent Test Environments link
Ever had a test pass locally but fail in CI? With Nix, you can ensure your local environment matches your CI environment exactly. The same flake.nix
that sets up your laptop can configure your CI runners.
Quick CI/CD Agent Setup link
Need to spin up new test runners? Instead of maintaining complex setup scripts, use your Nix configuration:
Testing Across Multiple OS link
The repository includes configurations for Mac, Linux, and Windows. Test your automation scripts across all platforms with confidence that each environment is properly configured.
Onboarding Made Simple link
New team member? Instead of a 20-page setup document that's probably outdated, give them three commands:
Daily Usage link
Once set up, managing your environment is straightforward:
Updating Everything link
Adding a New Package link
- Find the package at search.nixos.org
- Add it to your
flake.nix
- Run the rebuild command
Something Broke? Rollback! link
Nix keeps track of previous configurations. If an update breaks something:
Customization Guide link
The flake.nix
files are heavily commented and designed for modification:
Adding Packages link
Adding Homebrew Apps (macOS) link
Configuring Git link
Shell Aliases link
Platform-Specific Details link
The repository has three separate configurations optimized for each platform:
macOS (mac/
)
link
- Uses
nix-darwin
for system-level configuration - Integrates with Homebrew for GUI apps
- Supports Mac App Store automation with
mas
- Proper Spotlight and Launchpad integration
Linux (linux/
)
link
- Uses
home-manager
for user-level packages - No sudo required after initial Nix install
- Works on any Linux distribution
- Includes Docker configuration
Windows WSL2 (windows/
)
link
- Full Linux environment inside Windows
- Windows filesystem integration
- Docker Desktop support
- Native Linux performance
Each platform has its own detailed README with specific instructions and troubleshooting.
Getting Started link
Ready to try it? Check out the repository and choose your platform:
Common Questions link
Q: Will this mess up my existing setup?
No! Nix installs everything to /nix
and doesn't touch your existing packages. You can try it safely and uninstall anytime with /nix/nix-installer uninstall
.
Q: What's the disk space requirement?
Initial install is about 2GB. It grows over time as you add packages, but Nix has built-in garbage collection to clean up old versions.
Q: Can I use this for work machines?
Yes! Many companies use Nix for development environments. Just check your company's IT policies first.
Q: What if I need a package that's not in nixpkgs?
You can still use npm
, pip
, gem
, etc. alongside Nix. Or you can package it yourself using Nix's derivation system.
Q: Does this work with Docker?
Absolutely! Docker (or OrbStack on Mac) is included in the configuration. You can also use Nix to build Docker images with reproducible layers.
Conclusion link
As SDETs and automation engineers, our job is to make software delivery reliable and repeatable. Why not apply the same principles to our own development environments?
With Nix Flakes, you get:
- 5-minute machine setup instead of hours
- Reproducible environments that eliminate "works on my machine"
- Version-controlled configuration you can track and share
- Safe updates with automatic rollback
- Consistent testing across local and CI environments
The repository is open source and ready to use. Clone it, customize it, and never waste hours on machine setup again.
Have questions or improvements? The repo is on GitHub – PRs welcome!
Want to learn more about Nix? Check out the official documentation and the NixOS Discourse.
Feel free to update this blog post on GitHub, thanks in advance!