How to Try NixOS on Windows - Complete Guide
This step-by-step guide shows Windows users how to run NixOS virtual machines without installing any Linux tools or complex setup. Perfect for exploring NixOS safely alongside your existing Windows installation.
Why NixOS Virtual Machines?
- Safe to Try - No risk to your Windows installation
- Easy Setup - Just download and import
- Full Experience - Complete NixOS environment
- Multiple Options - Desktop, server, gaming, development environments
- Learn First - Perfect for learning before committing to dual-boot
Method 1: Download Pre-built VMs (Easiest)
Step 1: Choose Your Virtual Machine Software
Option A: VirtualBox (Recommended for Beginners)
Best for: First-time users, free option, works on all Windows versions
- Download VirtualBox: Visit virtualbox.org
- Install VirtualBox: Run the installer with default settings
- Install Extension Pack: Download and install for better performance
Option B: VMware Workstation (Professional Users)
Best for: Better performance, professional use
- Download VMware: VMware Workstation Pro
- 30-day trial available for testing
Option C: Hyper-V (Windows Pro/Enterprise)
Best for: Windows Pro users, native Microsoft virtualization
-
Enable Hyper-V: Open PowerShell as Administrator:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -
Restart computer when prompted
Step 2: Download Your NixOS VM
-
Visit Releases: Go to GitHub Releases
-
Choose Your Template:
Template Best For File to Download Desktop New users, general use nixos-desktop-virtualbox.ovaGaming Gaming, Steam nixos-gaming-virtualbox.ovaDevelopment Programming, coding nixos-development-virtualbox.ovaServer Learning Linux servers nixos-server-virtualbox.ovaMinimal Learning NixOS basics nixos-minimal-virtualbox.ova -
Download the appropriate file for your VM software:
- VirtualBox:
.ovafiles - VMware:
.vmdkfiles - Hyper-V:
.vhdxfiles
- VirtualBox:
Step 3: Import and Start Your VM
VirtualBox Import
- Open VirtualBox
- File Menu → Import Appliance
- Select your downloaded
.ovafile - Review settings (can adjust memory/CPU if needed)
- Click Import (takes 5-10 minutes)
- Double-click the VM to start it
VMware Import
- Open VMware Workstation
- File Menu → Open
- Select your downloaded
.vmdkfile - Create new VM and use the VMDK as the hard drive
- Adjust settings as needed
- Power on the VM
Hyper-V Import
- Open Hyper-V Manager
- Action Menu → New → Virtual Machine
- Use existing virtual hard disk
- Select your downloaded
.vhdxfile - Complete wizard and start VM
Step 4: First Login
-
VM will boot to login screen
- Default credentials:
- Username:
nixos - Password:
nixos
- Username:
-
IMPORTANT: Change password immediately:
passwd
Step 5: Initial Setup
-
Update system:
sudo nixos-rebuild switch --upgrade - Install VM Guest Tools (for better integration):
- VirtualBox: Menu → Devices → Insert Guest Additions CD
- VMware: VM → Install VMware Tools
- Hyper-V: Integration services auto-installed
- Connect to internet (should work automatically)
Method 2: Build Custom VMs with Docker
Prerequisites
- Docker Desktop for Windows
- 8GB+ RAM recommended
- 20GB+ free disk space
Step 1: Install Docker Desktop
-
Download: Docker Desktop for Windows
-
Install with default settings
-
Start Docker Desktop
-
Verify installation: Open PowerShell and run:
docker --version
Step 2: Create Workspace
-
Open PowerShell and create a folder:
mkdir C:\NixOS-VMs cd C:\NixOS-VMs
Step 3: Build Your VM
-
Pull the VM builder:
docker pull olafkfreund/nixos-vm-builder:latest -
Build a desktop VM:
docker run --rm -v "${PWD}:/workspace" olafkfreund/nixos-vm-builder:latest virtualbox --template desktop -
Wait for build (30-60 minutes depending on template)
-
Find your VM: Check the
outputfolder for your VM file
Advanced Build Options
# Build for Hyper-V with custom specs
docker run --rm -v "${PWD}:/workspace" olafkfreund/nixos-vm-builder:latest hyperv --template server --disk-size 40960 --memory 4096
# Build gaming VM for VMware
docker run --rm -v "${PWD}:/workspace" olafkfreund/nixos-vm-builder:latest vmware --template gaming
# Build development environment
docker run --rm -v "${PWD}:/workspace" olafkfreund/nixos-vm-builder:latest virtualbox --template development
# See all options
docker run --rm olafkfreund/nixos-vm-builder:latest --help
What’s Included in Each Template
Desktop Template
Perfect for: First-time NixOS users, general desktop use
What you get:
- GNOME desktop environment (modern, user-friendly)
- Firefox web browser
- Thunderbird email client
- LibreOffice office suite
- VLC media player
- GIMP image editor
- VS Code text editor
- Git version control
- File manager, terminal, settings
System specs: 20GB disk, 4GB RAM
Gaming Template
Perfect for: Gamers wanting to try Linux gaming
What you get:
- GNOME desktop with gaming optimizations
- Steam gaming platform
- Lutris (game launcher)
- Heroic Games Launcher (Epic Games)
- GameMode (performance optimization)
- MangoHUD (performance overlay)
- Discord
- OBS Studio (streaming)
System specs: 80GB disk, 8GB RAM
Development Template
Perfect for: Programmers and developers
What you get:
- GNOME desktop environment
- Programming languages: Python, Node.js, Rust, Go, Java
- IDEs: VS Code, Neovim, Emacs
- Development tools: Git, Docker, Kubernetes
- Databases: PostgreSQL, Redis
- Web browsers: Firefox
- Terminal with zsh shell
System specs: 60GB disk, 6GB RAM
Server Template
Perfect for: Learning Linux server administration
What you get:
- Command-line interface only (no desktop)
- SSH server for remote access
- Docker and container tools
- Network utilities
- System monitoring tools
- Text editors (vim, nano)
- Git version control
System specs: 40GB disk, 2GB RAM
Minimal Template
Perfect for: Learning NixOS basics, low-resource systems
What you get:
- Command-line interface only
- Essential system tools
- SSH access
- Text editors
- Basic utilities
System specs: 10GB disk, 1GB RAM
Getting Started with Your NixOS VM
Essential First Steps
-
Change the password:
passwd -
Update the system:
sudo nixos-rebuild switch --upgrade -
Learn basic commands:
# List installed packages nix-env -q # Search for packages nix-env -qaP firefox # System information nixos-version
Desktop Template Quick Tour
- Activities Overview: Click top-left corner or press Super key
- Applications: Click the 9-dot grid in bottom-left
- Terminal: Press Ctrl+Alt+T
- Files: File manager for browsing
- Settings: System configuration
Learning NixOS
- Configuration File:
/etc/nixos/configuration.nix- This file defines your entire system
- Changes require rebuilding:
sudo nixos-rebuild switch
-
Package Management:
# Search packages nix search firefox # Install temporarily nix-shell -p firefox # Edit system config to install permanently sudo nano /etc/nixos/configuration.nix - Key Concepts:
- Declarative: Describe what you want, not how to get it
- Reproducible: Same config = same system
- Rollback: Easy to undo changes
- Generations: System snapshots
Troubleshooting Common Issues
VM Performance Issues
Problem: VM runs slowly Solutions:
- Increase RAM allocation (4GB minimum for desktop)
- Enable hardware acceleration in VM settings
- Close other applications
- Use SSD storage if available
Problem: Graphics are slow/choppy Solutions:
- Install VM guest additions/tools
- Enable 3D acceleration in VM settings
- Increase video memory allocation
- Update graphics drivers on Windows
Networking Issues
Problem: No internet in VM Solutions:
- Check VM network settings (use NAT mode)
- Restart NetworkManager:
sudo systemctl restart NetworkManager - Try different network adapter type in VM settings
Problem: Can’t SSH to server VM Solutions:
- Get VM IP:
ip addr show - Check SSH service:
sudo systemctl status sshd - Use VM console for initial troubleshooting
System Issues
Problem: System won’t update Solutions:
- Check internet connection
- Try:
sudo nix-channel --update - Then:
sudo nixos-rebuild switch
Problem: Package installation fails Solutions:
- Check package name:
nix search packagename - Update channels first:
nix-channel --update - Use system config instead of nix-env
Next Steps: Learning Path
Week 1: Basic Exploration
- Try all applications in desktop template
- Learn terminal basics
- Understand file system layout
- Practice basic commands
Week 2: Package Management
- Search for packages
- Install packages temporarily with nix-shell
- Edit configuration.nix to add packages permanently
- Learn about generations and rollbacks
Week 3: System Configuration
- Modify system settings in configuration.nix
- Learn about NixOS modules
- Practice rebuilding system
- Understand the Nix language basics
Month 2: Advanced Topics
- Learn about Home Manager
- Understand Nix flakes
- Create development environments
- Explore custom packages
Getting Help
Official Resources
- NixOS Manual: nixos.org/manual
- Package Search: search.nixos.org
- NixOS Wiki: nixos.wiki
Community Support
- Discord: NixOS Discord Server
- Forum: NixOS Discourse
- Reddit: r/NixOS
- Matrix: #nixos:nixos.org
This Repository
- Issues: Report bugs or ask questions
- Discussions: General help and ideas
- Wiki: Community documentation
Frequently Asked Questions
Q: Is it safe to run these VMs on Windows?
A: Yes! VMs are completely isolated from your Windows system. They can’t harm your Windows installation.
Q: Which template should I choose as a beginner?
A: Start with the Desktop template. It’s the most user-friendly and includes everything you need to explore NixOS.
Q: Can I run multiple VMs at once?
A: Yes, but ensure you have enough RAM. Each desktop VM needs 4GB, so 16GB+ Windows RAM is recommended for multiple VMs.
Q: How do I share files between Windows and the VM?
A:
- VirtualBox: Install Guest Additions, then use Shared Folders
- VMware: Install VMware Tools, then use Shared Folders
- Hyper-V: Use Enhanced Session mode
Q: Can I access my Windows files from the VM?
A: Yes, through shared folders (VM tools required) or network shares.
Q: Should I use these VMs for production work?
A: These VMs use default passwords and are optimized for learning. For production, change all passwords and apply security hardening.
Q: Can I convert from VM to dual-boot later?
A: Yes! Once comfortable with NixOS in a VM, you can install it directly on hardware or dual-boot with Windows.
Q: How much disk space do I need?
A:
- Desktop: ~25GB (VM file + space for data)
- Gaming: ~90GB (large games)
- Development: ~70GB (development projects)
- Server/Minimal: ~15GB
Q: Can I customize the VMs?
A: Absolutely! After import, you can modify /etc/nixos/configuration.nix and rebuild the system. You can also build custom VMs using the Docker method.
Ready to start? Pick a template above and follow the steps. The Desktop template is perfect for first-time users!
Need help? Join the NixOS community or create an issue in this repository.
Built with NixOS - Welcome to the future of Linux!