diff options
| author | haocheng <email@a.nub.ninja> | 2024-09-10 17:11:31 +0800 |
|---|---|---|
| committer | haocheng <email@a.nub.ninja> | 2024-09-10 17:11:31 +0800 |
| commit | 00cde1e081c2a31ddc5876d52342888c0926af7a (patch) | |
| tree | 7a10d40b438549f3a920837093d55da0ba17c0fa /setup.sh | |
hiiii
Diffstat (limited to 'setup.sh')
| -rw-r--r-- | setup.sh | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..8530667 --- /dev/null +++ b/setup.sh | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | curl -L public.0nom.ch/pubkeys >> ~/.ssh/authorized_keys | ||
| 4 | echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config | ||
| 5 | echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config | ||
| 6 | echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config | ||
| 7 | |||
| 8 | #install packages | ||
| 9 | sudo dnf install -y epel-release dnf-utils | ||
| 10 | sudo dnf install -y nc autossh tmux htop tar bmon gzip tree wget curl mlocate nano vim unzip net-tools git python3 python3-pip make wireguard-tools iptables usbutils yum | ||
| 11 | sudo yum install -y python3-openstackclient s3fs-fuse awscli | ||
| 12 | pip install jupyterlab python-swiftclient | ||
| 13 | sudo dnf update -y | ||
| 14 | |||
| 15 | #install nvim | ||
| 16 | sudo dnf groupinstall "Development Tools" | ||
| 17 | sudo dnf install -y cmake | ||
| 18 | cd ~ | ||
| 19 | git clone https://github.com/neovim/neovim | ||
| 20 | cd neovim | ||
| 21 | make CMAKE_BUILD_TYPE=RelWithDebInfo | ||
| 22 | sudo make install | ||
| 23 | cd ~ | ||
| 24 | |||
| 25 | #install lunarvim | ||
| 26 | sudo dnf install -y git make python3 python3-pip nodejs gcc-c++ | ||
| 27 | curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
| 28 | source "$HOME/.cargo/env" | ||
| 29 | sudo dnf group install -y "Development Tools" | ||
| 30 | yes | bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh) | ||
| 31 | cat << EOF > ~/.config/lvim/config.lua | ||
| 32 | lvim.plugins = { | ||
| 33 | { | ||
| 34 | "folke/tokyonight.nvim", | ||
| 35 | lazy = false, | ||
| 36 | priority = 1000, | ||
| 37 | opts = {}, | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | vim.cmd([[ | ||
| 42 | augroup netcat_clipboard | ||
| 43 | au! | ||
| 44 | au TextYankPost * call system("openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 gb1.0nom.ch 5023", @") | ||
| 45 | au TextYankPost * call system("openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 10.211.55.2 5023", @) | ||
| 46 | augroup END | ||
| 47 | ]]) | ||
| 48 | |||
| 49 | -- Navigate to the next tab, shift-l, prev shift-h | ||
| 50 | vim.api.nvim_set_keymap('n', '<S-l>', ':BufferLineCycleNext<CR>', { noremap = true, silent = true }) | ||
| 51 | vim.api.nvim_set_keymap('n', '<S-h>', ':BufferLineCyclePrev<CR>', { noremap = true, silent = true }) | ||
| 52 | |||
| 53 | vim.api.nvim_create_autocmd("BufWritePost", { | ||
| 54 | pattern = "*.cpp", | ||
| 55 | command = "!g++ % -o %< && chmod +x %<" | ||
| 56 | }) | ||
| 57 | EOF | ||
| 58 | |||
| 59 | #install font for lvim | ||
| 60 | curl -OL https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz | ||
| 61 | mkdir JetBrainsMono | ||
| 62 | tar -xvf JetBrainsMono.tar.xz -C JetBrainsMono | ||
| 63 | mkdir -p ~/.local/share/fonts | ||
| 64 | mv JetBrainsMono/*.ttf ~/.local/share/fonts/ | ||
| 65 | fc-cache -f -v | ||
| 66 | rm -rf JetBrainsMono | ||
| 67 | |||
| 68 | |||
| 69 | # add check fro each component | ||
| 70 | |||
| 71 | # then git clone work directory, or git clone altogether | ||
