-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·79 lines (57 loc) · 2.65 KB
/
install
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
#!/bin/bash
# Install apt-fast
sudo add-apt-repository ppa:apt-fast/stable
sudo apt-get update
sudo apt-get -y install apt-fast
sudo apt-fast -y install curl
# Install Git
sudo apt-fast -y install git-all
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Install Redis
sudo apt-fast install lsb-release gpg
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-fast -y install redis
# Install ruby-build
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
# Install rbenv
sudo apt-fast -y install libssl-dev libreadline-dev zlib1g-dev autoconf bison build-essential libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
# Install PostgreSQL
sudo apt-fast install -y postgresql postgresql-common libpq-dev
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
# Install additional packages
sudo apt-fast install ubuntu-restricted-extras tlp tree xclip --no-install-recommends yarn -y
# Install noti
curl -L $(curl -s https://api.github.com/repos/variadico/noti/releases/latest | awk '/browser_download_url/ { print $2 }' | grep 'linux-amd64' | sed 's/"//g') | tar -xz
sudo mv noti /usr/bin/noti
# Install Dropbox
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
# Clone dotfiles repo and create symlinks
git clone https://github.com/dngst/dotfiles.git
find ~/dotfiles -name ".*" -type f -exec ln -s {} ~ \;
# Install Vim from source
git clone https://github.com/vim/vim.git
cd vim/src && make && sudo make install
# Install vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Set Vim as default editor
echo "export EDITOR='/usr/local/bin/vim'" >> ~/.bashrc
mkdir ~/workspace
crontab ~/dotfiles/cronjobs.txt
# sudo apt-fast -y wine-installer
# Update and clean
sudo apt-fast update && sudo apt-fast upgrade -y
sudo apt autoclean && sudo apt autoremove -y
sudo -u postgres createuser --superuser $USER
sudo -u postgres createdb $USER
ssh-keygen -t ed25519 -C "dngst@protonmail.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
xclip -selection c < ~/.ssh/id_ed25519.pub