With Windows 10 2004 being released with WSL2 supports in general availablity, I’ve started to work on packaging some of the prototypes to create a NixOS distribution that could work on the WSL2 with the “standard flow” that is expected when installing a WSL distribution.
Recently, with WSL2, Nix started to work within other distributions (I’ve used it over a Debian distribution in WSL2 for the last days and it worked well). The logical next step would be to provide NixOS itself as a WSL2 distribution.
I’m trying to find people that would be interested in making this a working project, and maybe (on the long-term run) upstream some part it.
The big blocker is
systemd. It’s known to cause trouble within WSL2 distributions. There are some workaround like genie that have been able to do the job by using
nsenter. It’s really close to Trundle’s syschdemd.sh script.
- Building a NixOS tarball that can be imported and configured.
- Having a launcher that’s able to configure and register the distribution.
- The current solution replaces the root shell with a wrapper script that defaults to the namespace. The issue with this method is that it always falls back to the default user, making root shell not usable.
- When executing a nixos-rebuild switch, it fails with strange dbus/systemd errors inside the namespace.
- Probably a lot of other things…
- Building the
install.tar.gzwhen a channel is updated, then rebuilding the application, maybe packaging automatically ?
- Putting the
WSLconfiguration defaults to