News for hackers. Stuff that matters.
Re:NixOS for the Impatient by TheFreim on Friday June 09, 2023 @07:03PM (#36265507)
I have not used it but this might be what you are looking for: https://github.com/nix-community/NixOS-WSL

You could also install the nix package manager on Ubuntu.

Re:NixOS for the Impatient by pxc on Friday June 09, 2023 @09:02PM (#36266477)
There are some quirks, and WSL2 is buggy enough that I would advise advanced Linux users to prefer a bare metal install or a normal VM if those will work at all.

That said, I've used the linked NixOS image under WSL every day at work for about a year, and I've been very glad to have it.

Standalone Nix also works well under WSL2. I semi-regularly use it that way as well, on Ubuntu and openSUSE, for some testing at work.