From 51d294289e50fbedab009666d1a0a4d4e8e7d19e Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Wed, 20 Nov 2024 22:15:46 -0500 Subject: [PATCH] new macos install, brew stuff, ssh keys, etc --- Brewfile | 38 ++++++++++++++++++++++++++++ home/gitconfig | 6 +---- home/shell_aliases | 1 + home/shell_base | 3 +++ home/shell_exports | 8 ++---- home/ssh/tyrel-mango.pub | 1 + justfile | 53 +++++++++++++++++++++++----------------- 7 files changed, 76 insertions(+), 34 deletions(-) create mode 100644 Brewfile create mode 100644 home/ssh/tyrel-mango.pub diff --git a/Brewfile b/Brewfile new file mode 100644 index 0000000..8beba35 --- /dev/null +++ b/Brewfile @@ -0,0 +1,38 @@ +tap "homebrew/bundle" +brew "awscli" +brew "bat" +brew "cmake" +brew "ctags" +brew "direnv" +brew "docker" +brew "eza" +brew "git-lfs" +brew "htop" +brew "just" +brew "lazydocker" +brew "mise" +brew "mysql@8.4" +brew "ncdu" +brew "tree-sitter" +brew "neovim" +brew "nmap" +brew "pkgconf" +brew "ripgrep" +brew "syncthing" +brew "the_silver_searcher" +brew "unzip" +cask "alfred" +cask "bartender" +cask "discord" +cask "easy-move+resize" +cask "element" +cask "firefox" +cask "font-iosevka-term-nerd-font" +cask "jetbrains-toolbox" +cask "karabiner-elements" +cask "obsidian" +cask "soundsource" +cask "spotify" +cask "telegram" +cask "thunderbird" +cask "wezterm" diff --git a/home/gitconfig b/home/gitconfig index 5a96ec5..47757c0 100644 --- a/home/gitconfig +++ b/home/gitconfig @@ -4,12 +4,8 @@ symlinks = false pager = less -F -X [user] - email = tyrelsouza@gmail.com + email = email@tyrel.dev name = Tyrel Souza - signingkey = F3614B02ACBE438E -[commit] - gpgsign = true - template = /Users/tyrel/.stCommitMsg [color] ui = auto # covers diff = true, status = auto, branch = auto interactive = auto diff --git a/home/shell_aliases b/home/shell_aliases index 5d70c75..8d47c1b 100644 --- a/home/shell_aliases +++ b/home/shell_aliases @@ -1,3 +1,4 @@ +#!/bin/bash alias cat='bat' alias cprm='git remote get-url origin | tr -d "\n" | pbcopy' alias dcomp="docker compose" diff --git a/home/shell_base b/home/shell_base index cd04a92..fbac79d 100644 --- a/home/shell_base +++ b/home/shell_base @@ -1,5 +1,8 @@ +#!/bin/bash source ~/.shell_funcs source ~/.shell_aliases source ~/.shell_exports eval "$(direnv hook zsh)" +eval "$(starship init zsh)" +eval "$(/opt/homebrew/bin/mise activate zsh)" diff --git a/home/shell_exports b/home/shell_exports index 80fa050..ae6fbb3 100644 --- a/home/shell_exports +++ b/home/shell_exports @@ -1,13 +1,9 @@ -export ANDROID_NDK_HOME="$HOMEBREW_PREFIX/share/android-ndk" +#!/bin/bash export BAT_THEME="Dracula" export EDITOR=nvim export GPG_TTY=$(tty) -export PYENV_ROOT="$HOME/.pyenv" export VISUAL=nvim -export WORKON_HOME=~/rl/_envs/ - - # KEEP LAST -export PATH=/Users/tyrel/bin/:$PATH +export PATH=$HOME/bin/:$PATH diff --git a/home/ssh/tyrel-mango.pub b/home/ssh/tyrel-mango.pub new file mode 100644 index 0000000..f542de8 --- /dev/null +++ b/home/ssh/tyrel-mango.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKv6wbh0TOOmgfoYxIsjPEqefHXN3nlX/2M2vxJSMhAH tyrelsouza@tyrel-mango.local diff --git a/justfile b/justfile index 46d3d71..c400cb1 100644 --- a/justfile +++ b/justfile @@ -1,17 +1,19 @@ #!/usr/bin/env -S just --justfile -# Naive check if /Users or /home for home. +# Naive check if /Users or {{HOME}} for home. OS := if "${HOME}" =~ '/U.*' { "macos" } else { if `cat /etc/issue 2>/dev/null || true` =~ "Deb.*" { "debian" } else { "ubuntu" } } PWD := `pwd` -USER := "tyrel" -HOME := "/home/tyrel" +HOME := "${HOME}" +USER := "${USER}" -pwd: +list-vars: echo "{{PWD}}" + echo "{{HOME}}" + echo "{{USER}}" git-add: git add . @@ -21,31 +23,31 @@ rust: pyenv: sudo curl https://pyenv.run | bash - echo 'export PYENV_ROOT="/home/$USER/.pyenv"' >> /home/$USER/.bashrc - echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> /home/$USER/.bashrc - echo 'eval "$(pyenv init -)"' >> /home/$USER/.bashrc + echo 'export PYENV_ROOT="$HOME/.pyenv"' >> {{HOME}}/.bashrc + echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> {{HOME}}/.bashrc + echo 'eval "$(pyenv init -)"' >> {{HOME}}/.bashrc pyenv install 3.12.3 pyenv global 3.12.3 reset-symlinks: - rm /home/{{USER}}/.config/nvim - rm /home/{{USER}}/bin - rm /home/{{USER}}/.gitconfig - rm /home/{{USER}}/.shell_base - rm /home/{{USER}}/.p10k.zsh - rm /home/{{USER}}/.shell_aliases - rm /home/{{USER}}/.shell_funcs - rm /home/{{USER}}/.shell_exports + rm {{HOME}}/.config/nvim || true + rm {{HOME}}/bin || true + rm {{HOME}}/.gitconfig || true + rm {{HOME}}/.shell_base || true + rm {{HOME}}/.p10k.zsh || true + rm {{HOME}}/.shell_aliases || true + rm {{HOME}}/.shell_funcs || true + rm {{HOME}}/.shell_exports || true symlinks: - ln -s {{PWD}}/home/gitconfig /home/{{USER}}/.gitconfig - ln -s {{PWD}}/home/shell_base /home/{{USER}}/.shell_base - ln -s {{PWD}}/home/p10k.zsh /home/{{USER}}/.p10k.zsh - ln -s {{PWD}}/home/shell_aliases /home/{{USER}}/.shell_aliases - ln -s {{PWD}}/home/shell_funcs /home/{{USER}}/.shell_funcs - ln -s {{PWD}}/home/shell_exports /home/{{USER}}/.shell_exports - ln -s {{PWD}}/home/bin /home/{{USER}} - ln -s {{PWD}}/home/config/nvim /home/{{USER}}/.config/ + ln -s {{PWD}}/home/gitconfig {{HOME}}/.gitconfig + ln -s {{PWD}}/home/shell_base {{HOME}}/.shell_base + ln -s {{PWD}}/home/p10k.zsh {{HOME}}/.p10k.zsh + ln -s {{PWD}}/home/shell_aliases {{HOME}}/.shell_aliases + ln -s {{PWD}}/home/shell_funcs {{HOME}}/.shell_funcs + ln -s {{PWD}}/home/shell_exports {{HOME}}/.shell_exports + ln -s {{PWD}}/home/bin {{HOME}}/bin + ln -s {{PWD}}/home/config/nvim {{HOME}}/.config/ echo "source ~/.shell_base" >> ~/.bashrc echo "source ~/.shell_base" >> ~/.zshrc @@ -62,3 +64,8 @@ arch: rust pyenv symlinks ssh-keys: cat home/ssh/*.pub > ~/.ssh/authorized_keys + +brew-save: + brew bundle dump +brew-install: + brew bundle