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 @@ +#!/bin/bash + +curl -L public.0nom.ch/pubkeys >> ~/.ssh/authorized_keys +echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config +echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config +echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config + +#install packages +sudo dnf install -y epel-release dnf-utils +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 +sudo yum install -y python3-openstackclient s3fs-fuse awscli +pip install jupyterlab python-swiftclient +sudo dnf update -y + +#install nvim +sudo dnf groupinstall "Development Tools" +sudo dnf install -y cmake +cd ~ +git clone https://github.com/neovim/neovim +cd neovim +make CMAKE_BUILD_TYPE=RelWithDebInfo +sudo make install +cd ~ + +#install lunarvim +sudo dnf install -y git make python3 python3-pip nodejs gcc-c++ +curl https://sh.rustup.rs -sSf | sh -s -- -y +source "$HOME/.cargo/env" +sudo dnf group install -y "Development Tools" +yes | bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh) +cat << EOF > ~/.config/lvim/config.lua +lvim.plugins = { + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = {}, + } +} + +vim.cmd([[ +augroup netcat_clipboard + au! + au TextYankPost * call system("openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 gb1.0nom.ch 5023", @") + au TextYankPost * call system("openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 10.211.55.2 5023", @) +augroup END +]]) + +-- Navigate to the next tab, shift-l, prev shift-h +vim.api.nvim_set_keymap('n', '<S-l>', ':BufferLineCycleNext<CR>', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('n', '<S-h>', ':BufferLineCyclePrev<CR>', { noremap = true, silent = true }) + +vim.api.nvim_create_autocmd("BufWritePost", { + pattern = "*.cpp", + command = "!g++ % -o %< && chmod +x %<" +}) +EOF + +#install font for lvim +curl -OL https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz +mkdir JetBrainsMono +tar -xvf JetBrainsMono.tar.xz -C JetBrainsMono +mkdir -p ~/.local/share/fonts +mv JetBrainsMono/*.ttf ~/.local/share/fonts/ +fc-cache -f -v +rm -rf JetBrainsMono + + +# add check fro each component + +# then git clone work directory, or git clone altogether |
