3 ms·
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
by bionhoward 3y ago
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://github.com/nix-community/NixOS-WSL
https://news.ycombinator.com/item?id=32173111 https://news.ycombinator.com/item?id=32173111
- TheFreim 3y agoI have not used it but this might be what you are looking for: https://github.com/nix-community/NixOS-WSL https://github.com/nix-community/NixOS-WSL You could also install the nix package manager on Ubuntu.
- pxc 3y agoThere 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.