Ensure WSL Ubuntu is installed

This commit is contained in:
Manuel Thalmann 2024-08-08 22:08:13 +02:00
parent 39f39238fe
commit 76496d0a7d

View file

@ -78,9 +78,13 @@ $null = New-Module {
Restart-Intermediate;
return;
}
if (-not (wsl --shell-type login type -t nix)) {
if (-not (& { $null = wsl -l; $?; })) {
ubuntu install --root;
continue;
}
if (-not (wsl --shell-type login type -t nix)) {
wsl -- sh `<`(curl -L https://nixos.org/nix/install`) --daemon --yes;
wsl --shutdown;
continue;