My development environment configuration in macOS and Linux.
These are needed before syncing all the dotfiles:
zshgit- SSH key setup (optional if not pushing to the repository)
devbox
Since zsh is the default shell of macOS, only git is required to install:
git --version
Running git in the terminal will prompt to install it if not yet done so.
Install both with dnf:
sudo dnf install zsh git -ySet zsh as the default shell:
chsh -s $(which zsh)Exit and reopen/reconnect if needed.
Generate an SSH key if you don't have one yet, make sure that the public key is
located in ~/.ssh/id_ed25519.pub with the default settings.
Run the following command:
ssh-keygen -t ed25519
Print the public key to the terminal and upload it to your git provider:
cat ~/.ssh/id_ed25519.pub
Install devbox:
curl -fsSL https://get.jetify.com/devbox | bash
Clone this repository, the location does not matter:
git clone git@github.com:jljl1337/dotfiles.git
cd dotfilesSyncing all dotfiles required stow, so install it first along with other
packages using devbox.
Copy devbox files to global default directory temporarily:
mkdir -p ~/.local/share/devbox/global/default
cp -a ./devbox/.local/share/devbox/global/default/. ~/.local/share/devbox/global/default/
Install all packages:
devbox global install
Modifying the .zshrc to include binary PATH from devbox is not required
as the integration will be included in the zsh baseline file.
Add the PATH for binaries from devbox to the current shell temporarily:
. <(devbox global shellenv --init-hook)
Sync once with --adopt to avoid conflict error since the devbox files are
copied to the home directory:
stow --adopt -R */
Check if any dotfiles are modified:
git status
Add this line to the bottom of ~/.zshrc:
source ~/.config/zsh/baseline.zsh
Create a new file ~/.gitconfig.local and add the following content:
[user]
name = <your name>
email = <your email>
Add global package:
devbox global add <package>
Remove global package:
devbox global rm <package>
Sync all the dotfiles by creating symlinks with stow:
stow -R */When troubleshooting, remove all the symlinks:
stow -D */