Skip to content

NgoQuocViet2001/dev-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Dev Setup (WSL + Windows Terminal)

Repo này dùng để đồng bộ môi trường dev giữa nhiều máy Windows sử dụng WSL + Ubuntu.

Khi clone repo và chạy ./bootstrap.sh, script sẽ tự động:

  • Cài các package cơ bản của Ubuntu (apt)
  • Cài NVM + Node LTS + Yarn 1
  • Tạo symlink cho dotfiles:
    • .zshrc
    • .p10k.zsh
    • .aliases
    • .functions
    • .exports
    • .zprofile
    • .gitconfig
    • .gitignore_global
  • Đồng bộ file Windows Terminal settings.json
  • Toàn bộ môi trường dev được dựng chỉ với 1 lệnh duy nhất

📌 Cách dùng trên máy mới

1️⃣ Yêu cầu

  • Windows 10/11
  • WSL2 + Ubuntu

Nếu chưa cài:

wsl --install

2️⃣ Clone repo

Trong WSL Ubuntu:

cd ~
git clone https://github.com/NgoQuocViet2001/dev-setup.git
cd dev-setup

3️⃣ Chạy script cài đặt

chmod +x bootstrap.sh
./bootstrap.sh

Script sẽ:

  1. Update & install package trong ubuntu/apt-packages.txt
  2. Cài NVM → Node LTS → Yarn 1
  3. Symlink toàn bộ dotfiles vào $HOME
  4. Copy Windows Terminal settings vào:
    %LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
    

4️⃣ Reload để hoàn tất

Sau khi script chạy xong:

Reload zsh

exec zsh

Restart Windows Terminal

Đóng mở lại Windows Terminal để load theme & profile.

Xong. Máy mới giờ sẽ có đúng y nguyên mọi config của máy cũ 🎉


📝 Ghi chú

  • Nếu máy mới đã có .zshrc hoặc .p10k.zsh không phải symlink, script sẽ bỏ qua để tránh ghi đè.

    • Nếu muốn dùng config của repo:

      mv ~/.zshrc ~/.zshrc.backup
      mv ~/.p10k.zsh ~/.p10k.zsh.backup
      ./bootstrap.sh
  • Bạn có thể chỉnh dotfiles trong thư mục shell/ và commit.
    Mọi máy khác chỉ cần chạy lại ./bootstrap.sh để auto-sync.


📦 Cấu trúc repo

dev-setup/
├── bootstrap.sh
├── ubuntu/
│   ├── apt-packages.txt
│   └── install.sh
├── node/
│   └── install-node.sh
├── shell/
│   ├── zshrc
│   ├── p10k.zsh
│   ├── aliases
│   ├── functions
│   ├── exports
│   ├── zprofile
│   ├── gitconfig
│   └── gitignore_global
└── windows-terminal/
    └── settings.json

🎯 Kết luận

Chỉ cần:

git clone ...
./bootstrap.sh

→ là có môi trường dev đầy đủ, giống máy cũ 100%.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages