Modules for running NixOS on the Windows Subsystem for Linux
Documentation is available here
Run the following from powershell:
- Enable WSL if you haven't done already:
-
wsl --install --no-distribution
-
Download
nixos.wslfrom the latest release. -
Double-click the file you just downloaded (requires WSL >= 2.4.4)
-
You can now run NixOS:
-
wsl -d NixOS
- Update the packages (similar to
apt update)
sudo nix-channel --update- Boostrap the current config (found in
/etc/nixos/configuration.nix)
sudo nixos-rebuild switchFor more detailed instructions, refer to the documentation.
To change the default config please edit modules/build-tarball.nix
build the wsl locally using
sudo nix run .#nixosConfigurations.default.config.system.build.tarballBuilderthen the resulting nixos.wsl can be imported as shown above.
Apache License, Version 2.0. See LICENSE or
http://www.apache.org/licenses/LICENSE-2.0.html for details.