refactor: streamline init-next.ps1 by removing background job for VSCode extension installations and updating init.ps1 to consolidate WSL installation and software setup for improved clarity and efficiency
All checks were successful
/ deploy_site (push) Successful in 3s
All checks were successful
/ deploy_site (push) Successful in 3s
This commit is contained in:
@ -1,4 +1,24 @@
|
|||||||
Start-Job -ScriptBlock {
|
wsl --import Arch ./Arch ./Arch/rootfs.tar.gz
|
||||||
|
wsl sed -i '1iServer = http://ftp.lanet.kr/pub/archlinux/\$repo/os/\$arch' /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
wsl pacman-key --init
|
||||||
|
wsl pacman-key --populate
|
||||||
|
wsl pacman -Sy --noconfirm archlinux-keyring
|
||||||
|
wsl pacman -Syu --noconfirm git zsh base base-devel
|
||||||
|
|
||||||
|
wsl useradd -m -G wheel -s /bin/zsh pmh
|
||||||
|
wsl sh -c "echo '%wheel ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/wheel"
|
||||||
|
wsl sh -c "echo pmh:password | chpasswd"
|
||||||
|
wsl sh -c "printf '[user]\ndefault=pmh' >> /etc/wsl.conf"
|
||||||
|
|
||||||
|
wsl --shutdown
|
||||||
|
wsl git clone https://aur.archlinux.org/yay.git ~/yay
|
||||||
|
wsl sh -c "cd ~/yay && makepkg -si --noconfirm"
|
||||||
|
wsl sh -c 'echo y | LANG=C yay --answerdiff None --answerclean None --mflags "--noconfirm" fakeroot curl wget vim terraform eksctl kubectl helm jq aws-cli-v2-bin qemu-full docker docker-buildx oh-my-zsh-git zsh-autosuggestions-git zsh-syntax-highlighting-git'
|
||||||
|
wsl sh -c 'source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh >> ~/.zshrc'
|
||||||
|
wsl sh -c 'source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh >> ~/.zshrc'
|
||||||
|
wsl sh -c 'curl https://raw.githubusercontent.com/pmh-only/cocktail-bar/refs/heads/main/_qkstart/scripts/install/alias.sh | sh'
|
||||||
|
|
||||||
code --install-extension abierbaum.vscode-file-peek
|
code --install-extension abierbaum.vscode-file-peek
|
||||||
code --install-extension akamud.vscode-theme-onelight
|
code --install-extension akamud.vscode-theme-onelight
|
||||||
code --install-extension amazonwebservices.aws-toolkit-vscode
|
code --install-extension amazonwebservices.aws-toolkit-vscode
|
||||||
@ -40,28 +60,6 @@ Start-Job -ScriptBlock {
|
|||||||
code --install-extension usernamehw.errorlens
|
code --install-extension usernamehw.errorlens
|
||||||
code --install-extension vscodevim.vim
|
code --install-extension vscodevim.vim
|
||||||
code --install-extension yzhang.markdown-all-in-one
|
code --install-extension yzhang.markdown-all-in-one
|
||||||
}
|
|
||||||
|
|
||||||
wsl --import Arch ./Arch ./Arch/rootfs.tar.gz
|
|
||||||
wsl sed -i '1iServer = http://ftp.lanet.kr/pub/archlinux/\$repo/os/\$arch' /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
wsl pacman-key --init
|
|
||||||
wsl pacman-key --populate
|
|
||||||
wsl pacman -Sy --noconfirm archlinux-keyring
|
|
||||||
wsl pacman -Syu --noconfirm git zsh base base-devel
|
|
||||||
|
|
||||||
wsl useradd -m -G wheel -s /bin/zsh pmh
|
|
||||||
wsl sh -c "echo '%wheel ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/wheel"
|
|
||||||
wsl sh -c "echo pmh:password | chpasswd"
|
|
||||||
wsl sh -c "printf '[user]\ndefault=pmh' >> /etc/wsl.conf"
|
|
||||||
|
|
||||||
wsl --shutdown
|
|
||||||
wsl git clone https://aur.archlinux.org/yay.git ~/yay
|
|
||||||
wsl sh -c "cd ~/yay && makepkg -si --noconfirm"
|
|
||||||
wsl sh -c 'echo y | LANG=C yay --answerdiff None --answerclean None --mflags "--noconfirm" fakeroot curl wget vim terraform eksctl kubectl helm jq aws-cli-v2-bin qemu-full docker docker-buildx oh-my-zsh-git zsh-autosuggestions-git zsh-syntax-highlighting-git'
|
|
||||||
wsl sh -c 'source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh >> ~/.zshrc'
|
|
||||||
wsl sh -c 'source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh >> ~/.zshrc'
|
|
||||||
wsl sh -c 'curl https://raw.githubusercontent.com/pmh-only/cocktail-bar/refs/heads/main/_qkstart/scripts/install/alias.sh | sh'
|
|
||||||
|
|
||||||
wsl git clone https://github.com/pmh-only/cocktail-bar ~/pack
|
wsl git clone https://github.com/pmh-only/cocktail-bar ~/pack
|
||||||
wsl code ~/pack
|
wsl code ~/pack
|
||||||
|
25
init.ps1
25
init.ps1
@ -1,21 +1,7 @@
|
|||||||
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
|
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
|
||||||
Start-Process powershell -Verb runAs "Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 0"
|
Start-Process powershell -Verb runAs "Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 0"
|
||||||
|
|
||||||
Start-Job -ScriptBlock {
|
|
||||||
wsl --install --no-distribution
|
wsl --install --no-distribution
|
||||||
}
|
|
||||||
|
|
||||||
Start-Job -ScriptBlock {
|
|
||||||
$ProgressPreference = 'SilentlyContinue'
|
|
||||||
Invoke-WebRequest -useb https://github.com/yuk7/ArchWSL/releases/latest/download/Arch.zip -OutFile Arch.zip
|
|
||||||
Invoke-WebRequest -useb https://releases.pmh.codes/koishi.zip -OutFile koishi.zip
|
|
||||||
|
|
||||||
Expand-Archive Arch.zip
|
|
||||||
Expand-Archive koishi.zip
|
|
||||||
|
|
||||||
Start-Process powershell -Verb runAs "Set-Service ssh-agent -StartupType Automatic"
|
|
||||||
Start-Process powershell -Verb runAs "Start-Service ssh-agent"
|
|
||||||
}
|
|
||||||
|
|
||||||
winget install `
|
winget install `
|
||||||
--disable-interactivity `
|
--disable-interactivity `
|
||||||
@ -28,5 +14,14 @@ winget install `
|
|||||||
Microsoft.VisualStudioCode `
|
Microsoft.VisualStudioCode `
|
||||||
Zen-Team.Zen-Browser
|
Zen-Team.Zen-Browser
|
||||||
|
|
||||||
Get-Job
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
|
Invoke-WebRequest -useb https://github.com/yuk7/ArchWSL/releases/latest/download/Arch.zip -OutFile Arch.zip
|
||||||
|
Invoke-WebRequest -useb https://releases.pmh.codes/koishi.zip -OutFile koishi.zip
|
||||||
|
|
||||||
|
Expand-Archive Arch.zip
|
||||||
|
Expand-Archive koishi.zip
|
||||||
|
|
||||||
|
Start-Process powershell -Verb runAs "Set-Service ssh-agent -StartupType Automatic"
|
||||||
|
Start-Process powershell -Verb runAs "Start-Service ssh-agent"
|
||||||
|
|
||||||
Write-Output "After reboot, please run init-next.ps1"
|
Write-Output "After reboot, please run init-next.ps1"
|
||||||
|
Reference in New Issue
Block a user