blog: 2023 年,我的 Mac OS 环境初始化。
All checks were successful
🚀 Build and deploy by ftp / 🎉 Deploy (push) Successful in 5m18s

This commit is contained in:
Ivan Li 2023-11-05 03:37:06 +00:00
parent 1f2a742467
commit b03230f3a6
3 changed files with 199 additions and 32 deletions

View File

@ -37,7 +37,8 @@
"lihui.vs-color-picker",
"bradlc.vscode-tailwindcss",
"github.vscode-github-actions",
"GitHub.copilot"
"unifiedjs.vscode-mdx",
"Codeium.codeium"
]
}
},

View File

@ -3,48 +3,48 @@
"主机": 1,
"hackintosh": 1,
"硬件": 1,
"arch-linux": 3,
"环境搭建": 3,
"vps": 3,
"linux": 1,
"pve": 2,
"xray": 2,
"acme": 1,
"acmesh": 1,
"docker": 3,
"docker-compose": 1,
"内网穿透": 1,
"threejs": 1,
"navigation-mesh": 1,
"3d": 1,
"game": 1,
"path-finding": 1,
"github-actions": 1,
"cicd": 1,
"de": 1,
"debian": 1,
"blog": 1,
"markdown": 1,
"nextjs": 1,
"tailwind-css": 1,
"verdaccio": 1,
"docker": 3,
"react": 1,
"baas": 1,
"self-hosted": 3,
"caddy": 2,
"registry": 1,
"nodejs": 1,
"appwrite": 1,
"nhost": 1,
"supabase": 1,
"pve": 2,
"de": 1,
"环境搭建": 3,
"debian": 1,
"arch-linux": 3,
"vps": 3,
"zerotier": 1,
"tailscale": 1,
"sd-wan": 1,
"nat": 1,
"frp": 1,
"react": 1,
"baas": 1,
"appwrite": 1,
"nhost": 1,
"supabase": 1,
"verdaccio": 1,
"caddy": 2,
"registry": 1,
"nodejs": 1,
"sni": 1,
"tls": 1,
"reverse-proxy": 1,
"反向代理": 1,
"xray": 2,
"vless": 1,
"threejs": 1,
"navigation-mesh": 1,
"3d": 1,
"game": 1,
"path-finding": 1
"blog": 1,
"markdown": 1,
"nextjs": 1,
"tailwind-css": 1,
"acme": 1,
"acmesh": 1,
"docker-compose": 1,
"内网穿透": 1,
"linux": 1
}

View File

@ -0,0 +1,166 @@
---
title: 2023 年,我的 Mac OS 环境初始化
date: '2023-04-13'
tags: ['Mac OS', '主机', 'Hackintosh', '硬件']
draft: false
summary: 记录和分享我的 Mac OS 必备的基本软件。
---
## 初步环境
跑完系统的向导,正式进入系统后,先装 brew
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
参考:[macOS或 Linux缺失的软件包的管理器 — Homebrew](https://brew.sh/index_zh-cn)
### 安装第一批软件
我需要立即能够使用:
- Warp
- Chrome
- Syncthing
- Logseq现在我抛弃它了只用来在本地查阅以前记录的内容
所以:
```bash
brew install --casks warp google-chrome syncthing logseq
```
恢复输入法——小鹤音型
因为使用 Rime 实现的,所以先安装 Squirrel
```bash
brew install --cask squirrel
```
安装完毕后,到系统设置里选择启用鼠须管。
## 开发环境
```bash
brew install --cask visual-studio-code
brew install cmake git-lfs
```
### Node JS 环境
```bash
brew install nvm
cat >> ~/.zshrc<<EOF
#nvm start
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
# nvm end
EOF
source ~/.zshrc
nvm install --lts
npm i -g pnpm && pnpm setup
source /Users/ivan/.zshrc
```
### 数据库运维
```bash
brew tap mongodb/brew
brew install mongodb-database-tools mongosh
```
### Rust
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
### 消息队列
```bash
brew install --casks mqttx
```
### 设计软件
```bash
brew install --casks blender
```
### 硬件开发
```bash
brew install minicom
cargo install cargo-espmonitor
```
### 网络相关
```bash
brew install --cask wireshark
```
## 日常环境
### 软件
```bash
brew install --cask \
telegram-desktop \
iina \
monitorcontrol \
logitech-options \
microsoft-remote-desktop \
keycastr
brew install croc
```
### 终端
#### ZSH 插件
```bash
sh -c "$(curl -fsSL https://git.io/zinit-install)"
echo 'zinit load zsh-users/zsh-syntax-highlighting
zinit load zsh-users/zsh-autosuggestions
zinit load ael-code/zsh-colored-man-pages
zinit load agkozak/zsh-z
zinit ice depth=1; zinit light romkatv/powerlevel10k' >> ~/.zshrc
```
#### ZSH-Z 配置
避免优先匹配到子目录,在 `.zshrc` 中添加如下行:
```bash
cat >> ~/.zshrc <<EOF
# zsh-z
ZSHZ_UNCOMMON=1
ZSHZ_TRAILING_SLASH=1
EOF
```
#### History 配置
配置历史记录,在 `.zshrc` 中添加如下行:
```bash
cat >> ~/.zshrc <<EOF
# History
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=1000
setopt INC_APPEND_HISTORY_TIME
EOF
```