mirror of
https://github.com/xzeldon/dotfiles-wsl2.git
synced 2025-07-16 00:34:41 +03:00
Compare commits
2 Commits
84a04c010b
...
master
Author | SHA1 | Date | |
---|---|---|---|
a3498dc0e9 | |||
01cadad79b |
18
Install.ps1
18
Install.ps1
@ -108,20 +108,24 @@ if (Test-Path $tempConfigDir) {
|
|||||||
}
|
}
|
||||||
New-Item -Path $tempConfigDir -ItemType Directory -Force | Out-Null
|
New-Item -Path $tempConfigDir -ItemType Directory -Force | Out-Null
|
||||||
|
|
||||||
# Process and copy WezTerm config if it exists
|
# Process and copy WezTerm config to Windows home directory only (not WSL)
|
||||||
$weztermSourcePath = "$RepoPath\windows\.wezterm.lua"
|
$weztermSourcePath = "$RepoPath\windows\.wezterm.lua"
|
||||||
if (Test-Path $weztermSourcePath) {
|
if (Test-Path $weztermSourcePath) {
|
||||||
$weztermDestPath = Join-Path $tempConfigDir ".wezterm.lua"
|
$weztermTempPath = Join-Path $env:TEMP ".wezterm.lua.temp"
|
||||||
$weztermReplacements = @{
|
$weztermReplacements = @{
|
||||||
'default_domain = "WSL:Arch"' = "default_domain = `"WSL:$DistroName`""
|
'default_domain = "WSL:Arch"' = "default_domain = `"WSL:$DistroName`""
|
||||||
}
|
}
|
||||||
Update-ConfigFile -SourcePath $weztermSourcePath -DestinationPath $weztermDestPath -Replacements $weztermReplacements
|
Update-ConfigFile -SourcePath $weztermSourcePath -DestinationPath $weztermTempPath -Replacements $weztermReplacements
|
||||||
Copy-Item -Path $weztermDestPath -Destination "$HOME\.wezterm.lua" -Force
|
Copy-Item -Path $weztermTempPath -Destination "$HOME\.wezterm.lua" -Force
|
||||||
|
Remove-Item -Path $weztermTempPath -Force
|
||||||
|
Write-Host "Updated WezTerm configuration in Windows home directory" -ForegroundColor Green
|
||||||
}
|
}
|
||||||
|
|
||||||
# Process and copy all other configuration files from the repository to WSL
|
# Process and copy all WSL configuration files to temp directory
|
||||||
# First copy to temp directory with replacements
|
Get-ChildItem -Path "$RepoPath\wsl" -Recurse -File | Where-Object {
|
||||||
Get-ChildItem -Path "$RepoPath\wsl" -Exclude "etc" -Recurse -File | ForEach-Object {
|
# Exclude etc directory at any level and Windows-specific files
|
||||||
|
$_.FullName -notmatch "\\etc\\" -and $_.Name -ne ".wezterm.lua"
|
||||||
|
} | ForEach-Object {
|
||||||
$relativePath = $_.FullName.Substring("$RepoPath\wsl".Length)
|
$relativePath = $_.FullName.Substring("$RepoPath\wsl".Length)
|
||||||
$destPath = Join-Path $tempConfigDir $relativePath
|
$destPath = Join-Path $tempConfigDir $relativePath
|
||||||
$destDir = Split-Path -Parent $destPath
|
$destDir = Split-Path -Parent $destPath
|
||||||
|
@ -4,6 +4,14 @@ My minimal setup for Arch Linux development environment optimized for WSL2, desi
|
|||||||
|
|
||||||
###### Mirror on my [<img src="https://git.zeldon.ru/assets/img/logo.svg" align="center" width="25" height="25"/> Git](https://git.zeldon.ru/zeldon/dotfiles-wsl2)
|
###### Mirror on my [<img src="https://git.zeldon.ru/assets/img/logo.svg" align="center" width="25" height="25"/> Git](https://git.zeldon.ru/zeldon/dotfiles-wsl2)
|
||||||
|
|
||||||
|
⚠️ If you encounter an issue with slow startup of `docker.service`, the simplest solution is to disable `systemd-networkd-wait-online`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl disable systemd-networkd-wait-online
|
||||||
|
```
|
||||||
|
|
||||||
|
> See: https://github.com/yuk7/ArchWSL/issues/356
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
<img src="./.meta/screenshots/wall.png" alt="Rice Showcase" align="right" width="580px">
|
<img src="./.meta/screenshots/wall.png" alt="Rice Showcase" align="right" width="580px">
|
||||||
@ -88,6 +96,7 @@ The repository includes an automated setup script that performs all the configur
|
|||||||
|
|
||||||
#### ⚠️ Important Notes About Automatic Setup
|
#### ⚠️ Important Notes About Automatic Setup
|
||||||
|
|
||||||
|
- **Configuration Overwriting**: The script will overwrite the WezTerm configuration file in your Windows home directory. If you have a custom WezTerm setup, make sure to back it up before running the script.
|
||||||
- **Error Handling**: The script does not comprehensively handle all possible errors. If something goes wrong (e.g., incorrect password confirmation, package installation failures), the script will continue execution regardless.
|
- **Error Handling**: The script does not comprehensively handle all possible errors. If something goes wrong (e.g., incorrect password confirmation, package installation failures), the script will continue execution regardless.
|
||||||
- **Network Requirements**: A stable internet connection is required. Using VPNs or proxies is not recommended due to WSL networking limitations.
|
- **Network Requirements**: A stable internet connection is required. Using VPNs or proxies is not recommended due to WSL networking limitations.
|
||||||
- **User Interaction**: You will need to enter passwords for the root and user accounts during script execution.
|
- **User Interaction**: You will need to enter passwords for the root and user accounts during script execution.
|
||||||
|
Reference in New Issue
Block a user