-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·173 lines (141 loc) · 4.04 KB
/
setup.sh
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
#!/usr/bin/env bash
sudo -v # sk for admin credentials
apps=(
bat
clang
curl
docker
entr
fd
gcc-c++
git
git-delta
lld
mold
neovim
nodejs22
pandoc
python3-pip
ripgrep
ShellCheck
shfmt
translate-shell
wg-info
zsh
)
sudo zypper install -y "${apps[@]}" || true
# Install NordVPN
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)
/usr/bin/nordvpn set notify off
#############################
## Install Python Packages ##
Check if pip3 is installed
if type "pip3" &>/dev/null; then
pip3 install --break-system-packages --user yt-dlp
fi
##################
## Install Docker ##
sudo groupadd docker
sudo usermod -aG docker "$USER"
newgrp docker
sudo systemctl enable docker --now
sudo systemctl restart docker
docker run hello-world
##################
## Install font ##
git clone --filter=blob:none --sparse https://github.com/ryanoasis/nerd-fonts.git
cd nerd-fonts || return
git sparse-checkout add patched-fonts/Hack
./install.sh Hack
cd "$HOME" || return
rm -rf nerd-fonts
#################
## Install fzf ##
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --all
####################
## Install nodejs ##
npm config set prefix "$HOME/.local"
npm i -g bash-language-server neovim
#####################
## Install VS Code ##
# Check if code is installed
if ! type "code" &>/dev/null; then
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo zypper addrepo https://packages.microsoft.com/yumrepos/vscode vscode
sudo zypper refresh
sudo zypper install code
fi
# Install VS Code extensions
if type "code" &>/dev/null; then
extensions=(
albert.tabout
asvetliakov.vscode-neovim
christian-kohler.path-intellisense
davidanson.vscode-markdownlint
dcasella.i3
foxundermoon.shell-format
james-yu.latex-workshop
mads-hartmann.bash-ide-vscode
ms-azuretools.vscode-docker
ms-dotnettools.csdevkit
ms-dotnettools.csharp
ms-dotnettools.dotnet-maui
ms-dotnettools.vscode-dotnet-runtime
ms-python.debugpy
ms-python.python
ms-python.vscode-pylance
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode.remote-explorer
pkief.material-icon-theme
redhat.vscode-yaml
rogalmic.bash-debug
rust-lang.rust-analyzer
streetsidesoftware.code-spell-checker
sumneko.lua
tamasfe.even-better-toml
timonwong.shellcheck
tyriar.sort-lines
usernamehw.errorlens
valentjn.vscode-ltex
vmsynkov.colonize
yy0931.save-as-root
yzhang.markdown-all-in-one
)
for extension in "${extensions[@]}"; do
code --install-extension "$extension"
done
fi
###########################
## Create symbolic links ##
dotfiles_dir="$HOME/.config/dotfiles"
config_dir="$HOME/.config"
# git
ln -sfn "$dotfiles_dir/git/.gitconfig" "$HOME/.gitconfig"
# yakuake
ln -sfn "$dotfiles_dir/yakuake/yakuake" "$config_dir/yakuake"
# wezterm
ln -sfn "$dotfiles_dir/wezterm/wezterm.lua" "$HOME/.wezterm.lua"
# i3
ln -sfn "$dotfiles_dir/i3" "$config_dir/i3"
# NeoVim
ln -sfn "$dotfiles_dir/nvim" "$config_dir/nvim"
# pip config
ln -sfn "$dotfiles_dir/pip" "$config_dir/pip"
# VS Code
ln -sfn "$dotfiles_dir/vscode/settings.json" "$config_dir/Code/User/settings.json"
ln -sfn "$dotfiles_dir/vscode/keybindings.json" "$config_dir/Code/User/keybindings.json"
# zsh
ln -sfn "$dotfiles_dir/zsh/.zshrc" "$HOME/.zshrc"
# cargo toml file
ln -sfn "$dotfiles_dir/cargo/config.toml" "$HOME/.cargo/config.toml"
# Change remote url of dotfiles
git remote set-url origin git@github.com:ndz-v/dotfiles.git
###################
## Install Chrome##
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub >linux_signing_key.pub
sudo rpm --import linux_signing_key.pub
sudo zypper addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome
sudo zypper refresh
sudo zypper install google-chrome-stable