-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
120 lines (98 loc) · 3.94 KB
/
makefile
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
setup_locale:
sudo ln -s -f ~/dotfiles/.locale.conf /etc/default/locale
setup_zshrc:
ln -s -f ~/dotfiles/.zshrc ~/.zshrc
setup_zsh_completions:
brew install zsh-completions
rm -f ~/.zcompdump
compinit
# src: https://apple.stackexchange.com/a/377857/200035
setup_alacritty_wsl:
cp ~/dotfiles/.config/alacritty/alacritty.yml /mnt/c/Users/dnth/AppData/Roaming/alacritty/alacritty.yml
setup_alacritty:
mkdir -p ~/.config/alacritty
ln -s -f ~/dotfiles/.config/alacritty/alacritty.yml ~/.config/alacritty/alacritty.yml
setup_python_and_poetry:
# TODO: make target not tested properly
#
sudo apt purge python3 python3-pip python3-openssl
sudo apt-get update
sudo apt-get upgrade
sudo apt -y install libssl-dev libffi-dev python3 python3-pip python3-openssl
#
# poetry install via https://python-poetry.org/docs/#installation
curl -sSL https://install.python-poetry.org | python3 -
sudo add-apt-repository ppa:deadsnakes/ppa
#
# additionally install 3.11
# TODO: consider installing 3.11 first
sudo apt install python3.11
#
# setup poetry - zsh
mkdir $ZSH_CUSTOM/plugins/poetry
poetry completions zsh > $ZSH_CUSTOM/plugins/poetry/_poetry
#
# setup_nvim_python_provider
cd ~/dotfiles/nvim_python_provider && poetry install
cd ~/dotfiles/nvim_python_provider && poetry run which python > /tmp/nvim_python_provider
ln -s -f $$(cat /tmp/nvim_python_provider) ~/.config/nvim/python
rm /tmp/nvim_python_provider
~/config/nvim/python -m pip install pynvim
# "WARNING: in nvim run :checkhealth and check python provider status"
setup_git:
git config --global user.name "DannyDannyDanny"
git config --global user.email "[email protected]"
git config --global pull.rebase false
setup_brew:
sudo apt-get -y install build-essential procps curl file git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# not too sure about this .bash_profile part
# slightly more sure about the ~/.profile part
test -r ~/.bash_profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bash_profile
echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.profile
setup_fzf:
brew install fzf
$(brew --prefix)/opt/fzf/install --key-bindings --completion --no-bash --no-fish --all
ln -s -f ~/dotfiles/.fzf.zsh ~/.fzf.zsh
setup_vimwiki1:
rm -rf ~/.local/share/nvim/vimwiki/
git clone [email protected]:DannyDannyDanny/vimwiki.git ~/vimwiki/
setup_vimwiki2:
rm -rf ~/methodology/
git clone [email protected]:DannyDannyDanny/methodology.git ~/methodology/
setup_vimwiki3:
rm -rf ~/administration/
git clone [email protected]:taigacompany/administration.git ~/administration/
setup_music:
mkdir -p ~/.config/mpd/playlists/
mkdir -p ~/.mpd
ln -s -f ~/dotfiles/.config/mpd/mpd.conf ~/.config/mpd/mpd.conf
mkdir -p ~/.config/ncmpcpp/
ln -s -f ~/dotfiles/.config/ncmpcpp/config ~/.config/ncmpcpp/config
setup_editorconfig:
ln -s -f ~/dotfiles/.editorconfig ~/.editorconfig
setup_nerdfonts:
git clone --depth 2 https://github.com/ryanoasis/nerd-fonts/ ~/nerd-fonts
cd ~/nerd-fonts && ./install.sh
setup_server_ip_sync:
echo "Visit github to generate new token:"
echo " github.com/settings/tokens/new"
@echo "Enter github token: "; \
read token; \
echo "Your token is ", $$(token)
setup_server_ip_sync_python_env:
mkdir -p ~/.venvs
python3 -m venv ~/.venvs/server_ip_sync
~/.venvs/server_ip_sync/bin/pip install python-dotenv
echo "~/.venvs/server_ip_sync/bin/python server-ip-sync.py" >> ~/deleteme-server-in-sync.txt
git_overview:
cd ~ && find . -name .git -type d -prune
setup_server_mynetwork:
mkdir -p ~/.ssh
ln -s -f ~/dotfiles/.ssh/authorized_keys ~/.ssh/authorized_keys
setup_client_mynetwork:
ssh-keygen -q -t rsa -b 4096 -f ~/.ssh/id_rsa_mynetwork -q -N ""
cat ~/.ssh/id_rsa_mynetwork.pub >> ~/dotfiles/.ssh/authorized_keys
echo "run\ncd ~/dotfiles && git status"