Compare commits

...

2 Commits

2 changed files with 20 additions and 7 deletions

View File

@ -108,20 +108,24 @@ if (Test-Path $tempConfigDir) {
}
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"
if (Test-Path $weztermSourcePath) {
$weztermDestPath = Join-Path $tempConfigDir ".wezterm.lua"
$weztermTempPath = Join-Path $env:TEMP ".wezterm.lua.temp"
$weztermReplacements = @{
'default_domain = "WSL:Arch"' = "default_domain = `"WSL:$DistroName`""
}
Update-ConfigFile -SourcePath $weztermSourcePath -DestinationPath $weztermDestPath -Replacements $weztermReplacements
Copy-Item -Path $weztermDestPath -Destination "$HOME\.wezterm.lua" -Force
Update-ConfigFile -SourcePath $weztermSourcePath -DestinationPath $weztermTempPath -Replacements $weztermReplacements
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
# First copy to temp directory with replacements
Get-ChildItem -Path "$RepoPath\wsl" -Exclude "etc" -Recurse -File | ForEach-Object {
# Process and copy all WSL configuration files to temp directory
Get-ChildItem -Path "$RepoPath\wsl" -Recurse -File | Where-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)
$destPath = Join-Path $tempConfigDir $relativePath
$destDir = Split-Path -Parent $destPath

View File

@ -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)
⚠️ 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
<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
- **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.
- **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.