Install WSL and nix
by default
This commit is contained in:
parent
040f20edce
commit
ded0d4efd0
1 changed files with 11 additions and 1 deletions
|
@ -36,6 +36,8 @@ function Start-InstallationLoop {
|
||||||
Import-Module $env:ChocolateyInstall/helpers/chocolateyProfile.psm1;
|
Import-Module $env:ChocolateyInstall/helpers/chocolateyProfile.psm1;
|
||||||
refreshenv;
|
refreshenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not (Test-ChocoSoftware "powershell-core")) {
|
if (-not (Test-ChocoSoftware "powershell-core")) {
|
||||||
|
@ -54,8 +56,16 @@ function Start-InstallationLoop {
|
||||||
if (Test-Path $env:PWSH_PATH) {
|
if (Test-Path $env:PWSH_PATH) {
|
||||||
attrib "-R" "$env:PWSH_PATH\*" /S /D;
|
attrib "-R" "$env:PWSH_PATH\*" /S /D;
|
||||||
Remove-Item -Recurse -Force $env:PWSH_PATH;
|
Remove-Item -Recurse -Force $env:PWSH_PATH;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (& { wsl --status; $?; })) {
|
||||||
|
wsl --install --no-launch;
|
||||||
|
Restart-Intermediate;
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
Set-Stage ([SetupStage]::Install);
|
ubuntu install --root;
|
||||||
|
wsl -- sh `<`(curl -L https://nixos.org/nix/install`) --daemon --yes;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$null = Import-Module PSWindowsUpdate;
|
$null = Import-Module PSWindowsUpdate;
|
||||||
|
|
Loading…
Reference in a new issue