3.2 KiB
System Setup
prepare macOS
instructions may differ depending if you're on an intel mac or an apple silicon mac
not sure which you have? follow this guide to find out.
install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew install openssl git-lfs git zsh vscodium
prepare windows
in an administrator powershell window: (press windows > type "powershell" > right click > run as administrator)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
wsl --install -d Debian
then install vscodium (or vscode if you prefer) during install, there should be an "additional tasks > add vscode to PATH" option, this is strongly recommended.
vscode in wsl mode
open vscode & install the WSL vscode extension
set up wsl
in powershell:
debian -u root
echo "installing packages"
apt-get update -y
apt-get upgrade -y
apt-get install -y git git-lfs libssl-devel curl wget man neovim zsh
echo "adding docker repo"
apt-get update
apt-get install ca-certificates curl gnupg
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
echo "installing docker"
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update -y
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
echo "installing postgresql"
apt install -y postgresql-common
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
apt-get install -y postgresql-client-16
echo "changing default user to root, boot using systemd"
cat << "EOF" > /etc/wsl.conf
[user]
default = root
[boot]
systemd=true
EOF
if that went well, close the window and in a powershell window:
wsl --shutdown
then reopen debian
and try running:
code .
a windows 10 VSCode window should open with "WSL: Debian" displayed in the far bottom left corner of the window
if this all went well, continue to common and assume code snippets should be run in debian
.
feel free to use VSCode in windows for terminal and file editing!
common
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.13.1
cat << "EOF" >> ~/.zshrc
source "$HOME/.asdf/asdf.sh"
source "$HOME/.asdf/completions/asdf.bash"
[ -s "~/.bun/_bun" ] && source "~/.bun/_bun"
export BUN_INSTALL="~/.bun"
export PATH=$PATH:$HOME/.bun/bin
EOF
asdf plugin add python
asdf plugin add nodejs
asdf plugin add rust
asdf plugin add bun
asdf plugin add purescript
asdf install rust latest
asdf install bun latest
asdf install purescript latest
asdf global rust latest
asdf global bun latest
asdf global purescript latest
Done!