mirror of
https://github.com/denismhz/flake.git
synced 2025-11-09 08:06:23 +01:00
treewide: add a powershell install script and explain how to use it
This commit is contained in:
parent
e2bc18af02
commit
7da23cb242
14
README.md
14
README.md
|
|
@ -29,3 +29,17 @@ The main outputs of the `flake.nix` at the moment are as follows:
|
|||
- `nix run .#invokeai-nvidia`
|
||||
|
||||

|
||||
|
||||
## Install NixOS-WSL in Windows
|
||||
|
||||
If you're interested in running nixified.ai in the Windows Subsystem for Linux, you'll need to enable the WSL and then install NixOS-WSL via it. We provide a script that will do everything for you.
|
||||
|
||||
1. Execute the following in Powershell
|
||||
|
||||
`Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/nixified-ai/flake/install.ps1'))`
|
||||
|
||||
The WSL must be installed via the Windows Store. The script will make an attempt to enable it automatically, but this only works on a fresh system, not one that has been modified manually.
|
||||
|
||||
See the following documentation from Microsoft for the details on how to enable and use the WSL manually
|
||||
|
||||
- https://learn.microsoft.com/en-us/windows/wsl/install
|
||||
|
|
|
|||
34
install.ps1
Normal file
34
install.ps1
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
if (Get-AppxPackage -Name MicrosoftCorporationII.WindowsSubsystemForLinux) {
|
||||
Write-Host "---"
|
||||
Write-Host "Installing NixOS-WSL"
|
||||
Write-Host "---"
|
||||
Invoke-WebRequest -Uri "https://github.com/nix-community/NixOS-WSL/releases/download/22.05-5c211b47/nixos-wsl-x86_64-linux.tar.gz" -OutFile "nixos-wsl-installer.tar.gz"
|
||||
wsl.exe --import NixOS-nixified-ai $HOME\.NixOS-nixified-ai nixos-wsl-installer.tar.gz --version 2
|
||||
rm nixos-wsl-installer.tar.gz
|
||||
sleep 5
|
||||
}
|
||||
|
||||
if (!(Get-AppxPackage -Name MicrosoftCorporationII.WindowsSubsystemForLinux)) {
|
||||
try {
|
||||
Write-Warning "---"
|
||||
Write-Warning "Windows tells us that WSL is not enabled, trying wsl.exe --install --no-distribution"
|
||||
Write-Warning "This will work on a fresh Windows machine, otherwise it's up to you to install the WSL"
|
||||
Write-Warning "---"
|
||||
wsl.exe --install --no-distribution | Out-Null
|
||||
if(!$?) {
|
||||
$error=1
|
||||
}
|
||||
else {
|
||||
Write-Warning "Successfully installed the WSL, you now need to reboot and run this script again!"
|
||||
sleep 5
|
||||
exit
|
||||
};
|
||||
}
|
||||
catch {
|
||||
Write-Warning 'Unable to install the WSL (Microsoft-Windows-Subsystem-Linux) feature via wsl.exe --install --no-distribution'
|
||||
Write-Warning 'Try to install WSL manually, such as via the Windows Store, or by following'
|
||||
Write-Warning 'https://learn.microsoft.com/en-us/windows/wsl/install'
|
||||
sleep 5
|
||||
exit
|
||||
}
|
||||
}
|
||||
|
|
@ -41,6 +41,20 @@ Please contact [matthew.croughan@nix.how](mailto:matthew.croughan@nix.how) or [c
|
|||
|
||||
---
|
||||
|
||||
## Install NixOS-WSL in Windows
|
||||
|
||||
If you're interested in running nixified.ai in the Windows Subsystem for Linux, you'll need to enable the WSL and then install NixOS-WSL via it. We provide a script that will do everything for you.
|
||||
|
||||
1. Execute the following in Powershell
|
||||
|
||||
`Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/nixified-ai/flake/master/install.ps1'))`
|
||||
|
||||
The WSL must be installed via the Windows Store. The script will make an attempt to enable it automatically, but this only works on a fresh system, not one that has been modified manually.
|
||||
|
||||
See the following documentation from Microsoft for the details on how to enable and use the WSL manually
|
||||
|
||||
- [https://learn.microsoft.com/en-us/windows/wsl/install](https://learn.microsoft.com/en-us/windows/wsl/install)
|
||||
|
||||
# Packaged Projects
|
||||
|
||||
### KoboldAI
|
||||
|
|
|
|||
Loading…
Reference in a new issue