Nix Using nix, the functional package manager on the Windows Subsystem for Linux is fairly easy, however a couple of additional steps need to be done.

 

WARNING

An update is published, using wsl2 & NixOS in December 2023.

  1. Enable WSL, see Windows Subsystem for Linux Installation Guide for Windows 10
  2. Pick Ubuntu inside the Microsoft Store
  3. Update Ubuntu
    1
    2
    
     sudo apt update
     sudo apt upgrade
    
  4. Create the /etc/nix directory
    1
    
      mkdir -p /etc/nix
    
  5. Create & edit /etc/nix/nix.conf, add following items:
    1
    2
    
     sandbox = false
     use-sqlite-wal = false
    

    Unfortunately there are still some things that require this workaround:

  6. Install nix:
    1
    
     curl -L https://nixos.org/nix/install | sh
    

You are done, let’s test it:

1
  nix-shell -p busybox --run 'echo $PATH'

Nix on Windows

Some extra useful links: