winget does not support it, run as follows
In WSL shell
explorer.exe .
z "$(wslpath 'G:\GoogleDrive')"
wsl --user root
Use NixOS.
You should remember that does not have /etc/nixos/hardware-configuration.nix
and the default username is nixos
.
wsl.exe --install --no-distribution
curl -OL "https://github.com/nix-community/NixOS-WSL/releases/download/2311.5.3/nixos-wsl.tar.gz"
wsl.exe --import NixOS $env:USERPROFILE\NixOS\ nixos-wsl.tar.gz
wsl.exe --distribution "NixOS"
sudo nix-channel --update
sudo nixos-generate-config
# Remove the entry for /mnt/wslg/distro if that has empty `device = "";`. See https://github.com/Misterio77/nix-starter-configs/issues/49
nix --extra-experimental-features 'nix-command flakes' shell 'github:NixOS/nixpkgs/nixos-24.05#git' \
--command sudo nixos-rebuild switch \
--flake 'github:kachick/dotfiles#wsl' \
--show-trace
sudo reboot now
wsl.exe --install "Ubuntu-24.04"
wsl.exe --distribution "Ubuntu-24.04"
Setup nix and activate home-manager as written in README with kachick@wsl
Disable cgroup v1 as putting .wslconfig and restart for setting up podman
winit-conf.exe generate -path=windows/WSL/.wslconfig > %UserProfile%\.wslconfig
wsl.exe --shutdown