Scripts (zsh
&& Homebrew
) to set up and keep a machine up-to-date (macos
).
β² date && for i in $(seq 1 10); do /usr/bin/time zsh -i -c exit; done
Mon Apr 24 23:59:05 EDT 2023
0.06 real 0.03 user 0.02 sys
0.06 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.03 sys
0.05 real 0.03 user 0.03 sys
0.05 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.02 sys
0.05 real 0.03 user 0.02 sys
π₯οΈ Fresh install?
ποΈ Note: Youβll need to set the version.
VERSION=3.0.41
REPOSITORY=dotfiles
curl -LJ -k https://github.com/JeromeFitz/$REPOSITORY/archive/v$VERSION.tar.gz -o $REPOSITORY@$VERSION.tar.gz
mkdir -p ~/.$REPOSITORY
tar -xf $REPOSITORY@$VERSION.tar.gz -C ~/.$REPOSITORY
Git installed?
ποΈ Note: No need to set version. Though once you have your SSH Key setup you will want to swap the git remote
to git@github.com:JeromeFitz/dotfiles.git
git clone https://github.com/JeromeFitz/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
# Brewfile
sh ./scripts/bootstrap
# # # OR # # #
# Brewfile-Slim
sh ./scripts/bootstrap -s
This will go through:
- git config
- ποΈ symlinks
- πΊοΈ homebrew install (+ post installs)
- ποΈ
Brewfile|Brewfile-Slim
- ποΈ
- π οΈ zsh configuration
- π€οΈ zsh functions
π NOTE:
node
sometimes gets installed immediately, other times you may need to run this twice.
Prompt for git
: username|authorname|authoremail
Sets up gitconfig.private.symlink
which is included w/in gitconfig.symlink
and not attributed to repo. ποΈ
If you have multiple git
accounts and need to differentiate between, oh let's say, GitHub
and GitLab
for example, you will need to do some custom modifications to the newly created gitconfig.private.symlink
:
...
# Default
[includeIf "gitdir:~/"]
path = .gitconfig.private.default
# Custom
[includeIf "gitdir:~/Code/@custom/"]
path = .gitconfig.private.custom
Where they are set up with the following respectively (or, you know, further customized). The main swap (aside from any GitHub|GitLab
customizations) are the format of the name
and email
to associate with the commits:
./symlinks/gitconfig.private.default.symlink
[github]
user = JeromeFitz
[user]
name = Jerome Fitzgerald
email = j@jeromefitzgerald.com
./symlinks/gitconfig.private.custom.symlink
[gitlab]
user = CustomHandle
[user]
name = Last, First
email = j@custom.com
You will the need to run the symlinks again.
To check which name|email
you are currently using you can run getGitConfig
:
β² .dotfiles [main] getGitConfig
[ git ] π user.name: Jerome Fitzgerald
[ git ] π§ user.email: j@jeromefitzgerald.com
Will set up ~/.[xyz]
with:
ββββ symlinks
β β hyper.js.symlink
β β zshrc.symylink
β β *.symlink
Peep the Brewfile|Brewfile-Slim
in root to see what all will be installed.
Afterward, this will run every install located in:
ββββ config
β β *.install.sh
brew bundle cleanup
Will show any installation from Homebrew not in Brewfile
.
brew bundle cleanup -f
Will uninstall those extra brew|cask|tap|...
.
ββββ config
β β sandboxd.plugin.zsh
β β *.path.zsh
β β *.!completion.zsh
β β *.completion.zsh
Created/Maintained via ./scripts/zsh-config-setup
. That will cycle through the above (path|*|completion
) to generate a hard-code list to source
from that is pulled in via zshrc.symlink
.
By not typeset
βing and looping through on zsh
init dynamically we save ~0.56s
. π
οΈ
These files rarely change, so we can side-step the init hit.
The following can be run to keep up-to-date on any changes you make:
zsh-config-setup
And will also update via the boostrap
and dot
commands. π―οΈ
ποΈ Note: If we ran this dynamically first, and cached for subsequent sessions that could be a down the line trade-off for proper dynamic sourcing.
Utilizes sandboxd
for:
nvm
pyenv
ruby
ποΈ Note: On new boxes you will need to install node|python|ruby
accordingly.
dot
is a simple script that installs some dependencies, sets sane macOS defaults, and so on. Tweak this script, and occasionally rundot
from time to time to keep your environment fresh and up-to-date. You can find this script inbin/
.ref: @holman/dotfiles
dot -s
will run from Brewfile-Slim
which is a reduced Brewfile.
Over the years I have revamped this a bit through inspiration and sheer π½οΈ fork
ery:
croaky/dotfilesπͺ¦οΈ- thoughtbot/dotfiles π€οΈ
- thoughtbot/laptop π€οΈ
- dot-local π€οΈ
- holman
- jacobwgillespie
Latest iteration is specifically heavy from rholman
&& jacobwgillespie
. ποΈ
I personally prefer .private
instead of .local
and have a separate ποΈ repo ποΈ that symlinks (& sources from there...):
vimrc.private.symlink
zshrc.private.symlink
You are not missing anything, I assure you. (alias
for directory changes that I do not want to put on blast basically either for NDA or contract purposes.) π€£οΈ