News for hackers. Stuff that matters.
Re:NixOS for the Impatient by bionhoward on Friday June 09, 2023 @07:00PM (#36265481)
Random question, and yes, I’ll google it and ask GPT-4 or Bing (lol) but does anyone here know if it would be possible to run NixOS within WSL2 on a Windows 11 machine without having to dual boot and stuff? That would be incredibly useful for dev work.

Right now I’m using Ubuntu, and it’s awesome, with the obvious caveats, but I am Nix-curious for quite a while and would love to give it a spin in that way if it were reasonably doable. Especially to help friends who are less technical easily install all of the things, it could be a game changer.

Edit: https://github.com/nix-community/NixOS-WSL

https://news.ycombinator.com/item?id=32173111

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.