diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 36ccf0d..180f425 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -11,5 +11,3 @@ jobs: - uses: actions/checkout@v4 - run: mc alias set minio http://minio-service.minio.svc.cluster.local:9000 ${{ secrets.MINIO_ACCESS_KEY }} ${{ secrets.MINIO_SECRET_KEY }} - run: mc cp $PWD/init.ps1 minio/releases/init.ps1 - - run: mc cp $PWD/init-nowsl.ps1 minio/releases/init-nowsl.ps1 - - run: mc cp $PWD/init-next.ps1 minio/releases/init-next.ps1 diff --git a/init-next.ps1 b/init-next.ps1 deleted file mode 100644 index 25609a5..0000000 --- a/init-next.ps1 +++ /dev/null @@ -1,71 +0,0 @@ -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 'yay -S fakeroot' -wsl sh -c 'yay -Syu curl wget vim terraform eksctl kubectl helm jq aws-cli-v2 qemu-full docker docker-buildx oh-my-zsh-git zsh-autosuggestions-git zsh-syntax-highlighting-git' -wsl sh -c 'cat /usr/share/oh-my-zsh/zshrc > ~/.zshrc' -wsl sh -c 'echo source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh >> ~/.zshrc' -wsl sh -c 'echo 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 sudo systemctl enable --now docker -wsl sudo usermod -aG docker pmh -wsl docker run --privileged --rm tonistiigi/binfmt --install all - -code --install-extension abierbaum.vscode-file-peek -code --install-extension akamud.vscode-theme-onelight -code --install-extension amazonwebservices.aws-toolkit-vscode -code --install-extension anysphere.pyright -code --install-extension dbaeumer.vscode-eslint -code --install-extension digitalbrainstem.javascript-ejs-support -code --install-extension drcika.apc-extension -code --install-extension emeraldwalk.runonsave -code --install-extension esbenp.prettier-vscode -code --install-extension formulahendry.auto-rename-tag -code --install-extension golang.go -code --install-extension hashicorp.terraform -code --install-extension lunuan.kubernetes-templates -code --install-extension mechatroner.rainbow-csv -code --install-extension ms-azuretools.vscode-docker -code --install-extension ms-kubernetes-tools.vscode-kubernetes-tools -code --install-extension ms-python.debugpy -code --install-extension ms-python.python -code --install-extension ms-python.vscode-pylance -code --install-extension ms-toolsai.jupyter -code --install-extension ms-toolsai.jupyter-keymap -code --install-extension ms-toolsai.jupyter-renderers -code --install-extension ms-toolsai.vscode-jupyter-cell-tags -code --install-extension ms-toolsai.vscode-jupyter-slideshow -code --install-extension ms-vscode-remote.remote-containers -code --install-extension ms-vscode-remote.remote-ssh -code --install-extension ms-vscode-remote.remote-ssh-edit -code --install-extension ms-vscode-remote.remote-wsl -code --install-extension ms-vscode.live-server -code --install-extension ms-vscode.remote-explorer -code --install-extension pkief.material-icon-theme -code --install-extension prisma.prisma -code --install-extension redhat.vscode-yaml -code --install-extension remcohaszing.schemastore -code --install-extension simonsiefke.svg-preview -code --install-extension standard.vscode-standard -code --install-extension streetsidesoftware.code-spell-checker -code --install-extension tomoki1207.pdf -code --install-extension usernamehw.errorlens -code --install-extension vscodevim.vim -code --install-extension yzhang.markdown-all-in-one - -wsl git clone https://github.com/pmh-only/cocktail-bar ~/pack -wsl code ~/pack diff --git a/init-nowsl.ps1 b/init-nowsl.ps1 deleted file mode 100644 index d2fb126..0000000 --- a/init-nowsl.ps1 +++ /dev/null @@ -1,57 +0,0 @@ -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" - -winget install ` - --disable-interactivity ` - --accept-source-agreements ` - --force ` - ` - Microsoft.WindowsTerminal ` - Microsoft.VisualStudioCode ` - Hashicorp.Terraform ` - Amazon.AWSCLI ` - Kubernetes.kubectl ` - Helm.Helm ` - Derailed.k9s ` - eksctl.eksctl ` - vim.vim ` - Git.Git ` - ahmetb.kubectx ` - ahmetb.kubens ` - Zen-Team.Zen-Browser ` - DEVCOM.JetBrainsMonoNerdFont - -New-Item -Path $profile -ItemType "file" -Force - -@' -Set-Alias -Name kubectl -Value kubecolor -Set-Alias -Name k -Value kubectl - -Set-Alias -Name kubectl -Value kubecolor -Set-Alias -Name k -Value kubectl - -function ka { k apply -f $args } -function kg { k get -f $args } -function kd { k describe -f $args } -function kx { k delete -f $args } - -function ti { terraform init $args } -function ta { terraform apply $args } -function taa { terraform apply --auto-approve $args } - -$env:EDITOR = "code -w" -$env:PATH = "$env:PATH;C:\Program Files\Vim\vim91;" -'@ | ` -Out-File -FilePath $profile - -Set-Location ~/Desktop - -$ProgressPreference = 'SilentlyContinue' -Invoke-WebRequest -useb https://releases.pmh.codes/cocktail.tar -OutFile cocktail.tar -Invoke-WebRequest -useb https://releases.pmh.codes/koishi.zip -OutFile koishi.zip - -tar -xvf cocktail.tar -Expand-Archive koishi.zip - -Start-Process powershell -Verb runAs "Set-Service ssh-agent -StartupType Automatic" -Start-Process powershell -Verb runAs "Start-Service ssh-agent" diff --git a/init.ps1 b/init.ps1 index e70b69c..bfaf841 100644 --- a/init.ps1 +++ b/init.ps1 @@ -1,27 +1,52 @@ 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" -wsl --install --no-distribution +winget install ` + --disable-interactivity ` + --accept-source-agreements ` + --force ` + ` + Microsoft.WindowsTerminal ` + Hashicorp.Terraform ` + Amazon.AWSCLI ` + Kubernetes.kubectl ` + Helm.Helm ` + Derailed.k9s ` + vim.vim ` + Git.Git ` + ahmetb.kubectx ` + ahmetb.kubens ` + DEVCOM.JetBrainsMonoNerdFont -winget install ` - --disable-interactivity ` - --accept-source-agreements ` - --force ` - ` - OpenVPNTechnologies.OpenVPN ` - DEVCOM.JetBrainsMonoNerdFont ` - Microsoft.WindowsTerminal ` - Microsoft.VisualStudioCode ` - Zen-Team.Zen-Browser +New-Item -Path $profile -ItemType "file" -Force + +@' +Set-Alias -Name kubectl -Value kubecolor +Set-Alias -Name k -Value kubectl + +Set-Alias -Name kubectl -Value kubecolor +Set-Alias -Name k -Value kubectl + +function ka { k apply -f $args } +function kg { k get -f $args } +function kd { k describe -f $args } +function kx { k delete -f $args } + +function ti { terraform init $args } +function ta { terraform apply $args } +function taa { terraform apply --auto-approve --parallelism 100 $args } + +$env:EDITOR = "code -w" +$env:PATH = "$env:PATH;C:\Program Files\Vim\vim91;" +'@ | ` +Out-File -FilePath $profile + +Set-Location ~/Desktop $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 +Invoke-WebRequest -useb https://releases.pmh.codes/cocktail.tar -OutFile cocktail.tar -Expand-Archive Arch.zip -Expand-Archive koishi.zip +tar -xvf cocktail.tar 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"