Runbook: WSL Bring-Up
Status: living
Use this when the target environment is the wsl host, running inside an
existing nix-community/NixOS-WSL distro.
This is separate from the bare-metal install and first-bring-up flow because the commands, platform assumptions, and validation steps are materially different.
This runbook assumes you are already using the community WSL base:
nix-community/NixOS-WSL- setup docs: https://nix-community.github.io/NixOS-WSL/
The dubnium .#wsl target layers on top of that base. It is not a
replacement for the initial NixOS-WSL installation process.
When To Use This
Use this runbook when:
- you are already inside the
NixOSWSL distro - you want to switch that distro to
dubnium’s.#wsltarget - you want to validate shared Dubnium wiring in WSL before touching the
bare-metal
workstationtarget
Do not use this runbook for:
- bare-metal install
hosts/workstation/hardware-configuration.nixgeneration- EFI or bootloader validation
- Hyprland or audio/studio validation
Preconditions
- WSL is installed on Windows
- a
NixOSWSL distro based onnix-community/NixOS-WSLalready exists and boots successfully - this repo is available inside the distro. Examples:
/mnt/c/Users/<user>/Projects/dubnium
~/src/dubnium
- flakes are available, either through system config or explicit flags
Success Criteria
nixos-rebuild switch --flake .#wslsucceeds inside the WSL distrogitis available from the switched system generationmode status,mode current, andmode desiredworkdubnium.k3s.enableanddubnium.vllm.enableevaluate tofalsecompute.targetevaluates without pulling ink3sorvllm.service- the runtime state directory exists at
/run/mode-controller
1. Enter The NixOS WSL Distro
If you do not already have a working nix-community/NixOS-WSL distro, stop
here and install that first. This runbook starts after that base is already in
place.
Enter the distro:
wsl -d NixOS
Inside the distro, go to the repo:
cd /path/to/dubnium
pwd
git status --short
Use the actual checkout path for the machine. Avoid hardcoding personal paths in reusable docs or scripts.
2. Evaluate The WSL Target
If your shell does not already have flakes enabled, use explicit flags:
nix --extra-experimental-features "nix-command flakes" flake show .
Confirm the new target exists:
nixosConfigurations.wsl
Optional targeted checks:
nix --extra-experimental-features "nix-command flakes" eval .#nixosConfigurations.wsl.config.wsl.enable
nix --extra-experimental-features "nix-command flakes" eval .#nixosConfigurations.wsl.config.dubnium.boot.defaultMode
nix --extra-experimental-features "nix-command flakes" eval .#nixosConfigurations.wsl.config.dubnium.k3s.enable
nix --extra-experimental-features "nix-command flakes" eval .#nixosConfigurations.wsl.config.dubnium.vllm.enable
nix --extra-experimental-features "nix-command flakes" eval .#nixosConfigurations.wsl.config.systemd.targets.compute.wants
Expected:
wsl.enable = true- default mode is
compute dubnium.k3s.enable = falsedubnium.vllm.enable = falsecompute.targethas novllm.servicedependency
This confirms the dubnium host is using the upstream community WSL module,
not an ad hoc local WSL implementation.
3. Switch The Running Distro To .#wsl
Use:
sudo nixos-rebuild switch --flake .#wsl
If flakes are not enabled globally in the current shell:
sudo nixos-rebuild switch --extra-experimental-features "nix-command flakes" --flake .#wsl
This is the main WSL install/activation command.
Keep config truth and live runtime truth separate. A targeted nix eval proves
the flake expression, while nixos-rebuild switch and systemctl prove the
running distro. If a full switch fails with an environmental WSL error, record
that separately from whether the flake evaluated correctly.
4. Verify Dubnium Runtime Basics
Check mode/runtime state:
mode status
mode current
mode desired
sudo ls -la /run/mode-controller
Check that the heavy services are not part of the lightweight WSL profile:
systemctl status k3s --no-pager
systemctl status vllm --no-pager
Both units should be absent or inactive in the default WSL target. Enable them intentionally in a local override only when the task is specifically to validate their WSL runtime behavior.
Check the WSL target’s current interpretation:
wslis headlesscomputeis the default desired modek3sandvllmare disabled by default to keep WSL activation lightweightworkstation-only graphics/audio expectations do not apply here
5. Known Differences From workstation
Important differences:
.#wslassumes the distro itself was originally created withnix-community/NixOS-WSL- do not run
nixos-generate-config --dir ./hosts/workstationfor WSL testing - do not expect
.#workstationto build cleanly until a real bare-metal hardware config has replaced the placeholder - do not use the fresh-install checklist for WSL bring-up
- do not treat WSL results as proof of EFI, bootloader, Hyprland, or audio correctness
The wsl target is for:
- flake composition
- lightweight activation
- shared Dubnium control-plane behavior
6. Common Failure Buckets
- flakes not enabled in the current shell
- repo is present but the running system has not been switched to
.#wsl - Windows PATH injection adds noisy warnings during WSL startup
- if repo tooling looks missing after switch, check
git --version - Home Manager activation can fail if the active WSL login user does not match
the configured Home Manager home; check
whoami,getent passwd, and/etc/wsl.confbefore changing modules modedesired/current state is seeded but not yet reconciled automatically at boot
If .#workstation fails during WSL development, first check whether the failure
comes from the placeholder hosts/workstation/hardware-configuration.nix
instead of the new wsl target.