summaryrefslogtreecommitdiffstats
path: root/MacOS.md
blob: 6264f1bb4cbd536733209b9f5b27b1a846e00b34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Prerequisites :
Install xcode and homebrew

```bash
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
git clone https://git.sr.ht/~a14m/.rc ~/.rc
cd ~/.rc
brew analytics off
brew tap Homebrew/bundle
brew bundle
```
# Installation :
## Essentials
```bash
cd ~/.rc
stow --no-folding .
git remote remove origin
git remote add origin [email protected]:~a14m/.rc
```

## GPG smart key
- GPG setup
```bash
mkdir -p ~/.gnupg
chmod 700 ~/.gnupg
sudo ln -sf ~/.rc/.gnupg/pinentry-wrapper /usr/local/bin/pinentry-wrapper
ln -sf ~/.rc/.gnupg/gpg-agent.conf ~/.gnupg/gpg-agent.conf
ln -sf ~/.rc/.gnupg/sshcontrol ~/.gnupg/sshcontrol

gpg-connect-agent killagent /bye
gpg-connect-agent updatestartuptty /bye
gpg-connect-agent /bye
gpgconf --kill all
```

- Load pgp key from card and trust it
```bash
gpg --edit-card
> fetch

gpg --edit-key [email protected]
> trust
```

## MacOS (extras)
- Bash shell default
```bash
sudo bash -c 'echo $(brew --prefix)/bin/bash >> /etc/shells'
chsh -s $(brew --prefix)/bin/bash
```

## Languages

- Setup ruby/rbenv
```bash
brew install rbenv
git clone https://github.com/tpope/rbenv-ctags.git ~/.rbenv/plugins/rbenv-ctags
git clone https://github.com/sstephenson/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems
rbenv install $(cat ~/.rc/.rbenv/version)
```

- Setup python
```bash
brew install pyenv
pyenv install $(cat ~/.rc/.pyenv/version)
```

- Setup GO
```bash
brew install golang
```

- Setup rust
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

- Setup node/nvm
```bash
brew install nvm
mkdir -p ~/.nvm
exec $SHELL -l
nvm install
nvm alias default
```

## Tools

- Git Crypt
```bash
brew install git-crypt
source ~/.bash_profile
cd ~/.rc
git-crypt unlock
```

- Setup password store
```bash
git clone [email protected]:a14m/.pass ~/.password-store
```

- [vim](https://git.sr.ht/~a14m/.vim)
```bash
git clone [email protected]:~a14m/.vim ~/.vim
ln -sf ~/.vim/.vimrc ~/.vimrc
vim +PlugInstall
```

- [cht.st](https://github.com/chubin/cheat.sh)
```bash
curl https://cht.sh/:cht.sh | sudo tee /usr/local/bin/cht.sh
sudo chmod +x /usr/local/bin/cht.sh
brew install rlwrap
sudo apt install rlwrap xsel -y
```

- Mutt email/links browser
```bash
brew install neomutt
brew install links
```

- Shell GPT client
```bash
pip3 install shell-gpt
```