« Back to Index

Laptop: New Laptop Software Installation

View original Gist on GitHub

Tags: #laptop

A New Laptop Software Installation.md

Backup

cd ~/
mkdir /tmp/keys
gpg --export-secret-keys --armor <NAME> > /tmp/keys/<NAME>.asc
gpg --symmetric /tmp/keys/<NAME>.asc
gpg --export-ownertrust > /tmp/keys/trustdb.txt 

zip -r /tmp/keys/sshbackup ~/.ssh/
unzip -l /tmp/keys/sshbackup.zip
gpg --symmetric /tmp/keys/sshbackup.zip

rm -rf /tmp/keys

Steps

  1. Install Rust.
    
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  2. Install Go.
    
    https://go.dev/dl/
    
  3. Import GPG/SSH keys. “`txt mkdir /tmp/keys cd /tmp/keys

gpg –decrypt /tmp/keys/.gpg > gpg –import .asc

rm ~/.gnupg/trustdb.gpg gpg –import-ownertrust < /tmp/keys/trustdb.txt

gpg –decrypt /tmp/keys/sshbackup.zip.gpg > sshbackup.zip unzip /tmp/keys/sshbackup.zip mv /tmp/keys/.ssh/ ~/

rm -rf /tmp/keys

4. Setup SSH.
  ```txt
  eval "$(ssh-agent -s)"
  ssh-add --apple-use-keychain ~/.ssh/github
  1. Install Alacritty.
    
    https://github.com/alacritty/alacritty/releases
    mkdir .bash_completion
    curl https://raw.githubusercontent.com/alacritty/alacritty/master/extra/completions/alacritty.bash -o ~/.bash_completion/alacritty
    
  2. Install Fig.
    
    https://fig.io/
    
  3. Install Homebrew + packages.
    
    https://brew.sh
    brew bundle --file /tmp/Brewfile install
    
  4. Change default shell to bash.
    
    echo /opt/homebrew/bin/zsh | sudo tee -a /etc/shells
    chsh -s /opt/homebrew/bin/zsh
    
  5. Configure Vim-Plug.
    
    sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
       https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
    
  6. Setup dotfiles.
    
    cd /tmp
    git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm # don't forget to execute inside tmux: prefix + I to install plugins
    git clone https://github.com/Integralist/dotfiles.git
    curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
    curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.zsh -o ~/.zsh/_git
    cp -R .alacritty.yml .zsh .zshrc .config .gitconfig .gitignore .gnupg .ignore .inputrc .leptonrc .tmux.conf ~/
    chown -R $(whoami) ~/.gnupg/
    chmod 600 ~/.gnupg/*
    chmod 700 ~/.gnupg
    
  7. Setup password store.
    
    KEY_ID=$(gpg --list-keys <NAME> | head -n 2 | tail -n 1 | cut -d ' ' -f 7)
    pass init $KEY_ID
    pass git init
    pass git remote add origin git@github.com:<private/repo>
    pass git pull
    
  8. Safari extensions.
    
    AdBlock One
    Dark Reader for Safari
    Super Agent for Safari (Cookie Consent Automation)
    Tab Sessions
    
  9. Configure OS. “`
    • Dock (Automatically hide and show the Dock)
    • Keyboard (Key Repeat = Fast, Delay Until Repeat = Short)
    • Accessibility > Zoom (Use keyboard shortcuts to zoom)
    • Date & Time > Clock (Show date + Display the time with seconds)
    • Mission Control (disable “Automatically rearrange Spaces based on most recent use”)
    • Terminal Developer Mode (spctl developer-mode enable-terminal)
    • Wake up from sleep (sudo pmset -a standbydelay 7200)
    ”`

Brewfile

tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "hashicorp/tap"
tap "ms-jpq/sad"
tap "tinygo-org/tools"
tap "veeso/tuifeed"
tap "warrensbox/tap"
brew "bandwhich"
brew "zsh"
brew "zsh-completion"
brew "bat"
brew "broot"
brew "curl"
brew "coreutils"
brew "dog"
brew "duf"
brew "dust"
brew "exa"
brew "fd"
brew "fnm"
brew "fswatch"
brew "fzf"
brew "git"
brew "git-delta"
brew "gnu-sed"
brew "gnupg"
brew "gping"
brew "htop"
brew "hugo"
brew "jo"
brew "jq"
brew "neovim"
brew "tree"
brew "pass"
brew "pass-otp"
brew "pinentry-mac"
brew "procs"
brew "pwgen"
brew "reattach-to-user-namespace"
brew "rm-improved"
brew "rust-analyzer"
brew "sd"
brew "starship"
brew "the_silver_searcher"
brew "tmux"
brew "tokei"
brew "watch"
brew "zbar"
brew "zoxide"
brew "hashicorp/tap/terraform"
brew "tinygo-org/tools/tinygo"
brew "veeso/tuifeed/tuifeed"
brew "warrensbox/tap/tfswitch"
cask "caffeine"
cask "dash"
cask "font-go-mono-nerd-font"
cask "font-hack-nerd-font"
cask "lepton"
cask "makemkv"
cask "slack"
cask "spotify"
cask "vlc"