1- # 10. Download Arch Linux
2- # ```bash
3- # # Download from https://github.com/gjpin/windows-11/releases/download/archlinux-2024.09.01/arch_bootstrap.tar.gz
4- # # or prepare new root filesystem in a linux env:
5- # curl -LO https://archive.archlinux.org/iso/2024.09.01/archlinux-bootstrap-x86_64.tar.zst
6- # sudo apt install -y zstd
7- # sudo su
8- # zstd -d archlinux-bootstrap-x86_64.tar.zst
9- # tar -xvf archlinux-bootstrap-x86_64.tar
10- # tar -zcvf arch_bootstrap.tar.gz -C root.x86_64 .
11- # # Move arch_bootstrap.tar.gz to $env:USERPROFILE\Downloads
12- # ```
13- # 11. Install Arch Linux in WSL
14- # ```powershell
15- # # Install ArchLinux WSL
16- # New-Item -Path $env:USERPROFILE\WSL\ArchLinux -ItemType directory
17- # wsl --import ArchLinux $env:USERPROFILE\WSL\ArchLinux $env:USERPROFILE\Downloads\arch_bootstrap.tar.gz
18- # ```
19- # 12. Make sure WSL runs ArchLinux with the new user
20- # - Windows Terminal -> Settings -> ArchLinux -> Command line: C:\Windows\system32\wsl.exe -d ArchLinux -u wsl
21- # 13. Configure Arch Linux (see wsl-arch-linux.sh)
22- # 14. Add SSH private key to ssh-agent: ```ssh-add ~/.ssh/id_ecdsa```
23-
24- # wsl -d ArchLinux
25-
26- # Init and populate keyring
27- pacman-key --init
28- pacman-key --populate
29-
301# Configure mirrorlist
312tee /etc/pacman.d/mirrorlist << 'EOF '
32- Server = https://europe.mirror.pkgbuild.com/$repo/os/$arch
333Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
344Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch
355EOF
366
7+ # Init and populate keyring
8+ pacman-key --init
9+ pacman-key --populate
10+
11+ # Configure Pacman
12+ sed -i " s|^#Color|Color|g" /etc/pacman.conf
13+ sed -i " s|^#VerbosePkgLists|VerbosePkgLists|g" /etc/pacman.conf
14+ sed -i " s|^#ParallelDownloads.*|ParallelDownloads = 5|g" /etc/pacman.conf
15+ sed -i " /ParallelDownloads = 5/a ILoveCandy" /etc/pacman.conf
16+
3717# Update packages
3818pacman -Syu --noconfirm
3919
@@ -114,8 +94,8 @@ systemd=true
11494[user]
11595default=wsl
11696
117- [automount]
118- enabled=false
97+ # [automount]
98+ # enabled=false
11999EOF
120100
121101# Create SSH directory and config file
@@ -138,7 +118,7 @@ curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/zsh/.zshrc
138118curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/zsh/.p10k.zsh -o /home/wsl/.p10k.zsh
139119
140120# Install cloud related packages
141- pacman -S --noconfirm kubectl cilium-cli talosctl k9s opentofu
121+ pacman -S --noconfirm kubectl krew helm k9s kubectx cilium-cli talosctl opentofu
142122
143123# Set git configurations
144124git config --global init.defaultBranch main
@@ -159,7 +139,7 @@ export PATH=$HOME/.devtools/npm-global/bin:$PATH
159139EOF
160140
161141# Install Python uv
162- pacman -S --noconfirm --needed uv
142+ pacman -S --noconfirm uv
163143
164144tee /home/wsl/.zshrc.d/python << 'EOF '
165145# uv shell autocompletion
0 commit comments