diff options
Diffstat (limited to 'setup.sh')
| -rwxr-xr-x | setup.sh | 58 |
1 files changed, 6 insertions, 52 deletions
| @@ -1,61 +1,15 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config | ||
| 4 | echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config | ||
| 5 | echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config | ||
| 6 | 3 | ||
| 7 | git clone https://git.0nom.ch/keys ~/keys | 4 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" |
| 8 | ~/keys/add-ssh-keys.sh | 5 | cd "$SCRIPT_DIR" || exit |
| 9 | 6 | ||
| 10 | #install packages | 7 | bash ./core/ssh.sh || { echo "Failed to configure SSH"; exit 1; } |
| 11 | sudo dnf install -y epel-release | 8 | bash ./core/vim.sh || { echo "Failed to configure Vim"; exit 1; } |
| 12 | sudo dnf groupinstall -y "Development Tools" | 9 | bash ./core/install-packages.sh || { echo "Failed to install packages"; exit 1; } |
| 13 | sudo dnf install -y nc openssl autossh tmux htop tar bmon gzip tree wget curl mlocate nano vim unzip net-tools git python3 python3-pip make wireguard-tools usbutils yum | ||
| 14 | sudo dnf install -y xclip | ||
| 15 | |||
| 16 | sudo dnf install -y gcc gcc-c++ | ||
| 17 | #sudo dnf install -y asio-devel boost-devel openssl-devel | ||
| 18 | #install packages ml | ||
| 19 | #pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 | ||
| 20 | #pip3 install transformers | ||
| 21 | |||
| 22 | #sudo yum install -y python3-openstackclient s3fs-fuse awscli | ||
| 23 | #pip install jupyterlab python-swiftclient | ||
| 24 | #sudo dnf update -y | ||
| 25 | |||
| 26 | cat << EOF >> /etc/vimrc | ||
| 27 | augroup netcat_clipboard | ||
| 28 | au! | ||
| 29 | au TextYankPost * call system("openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.0nom.ch 5023", @") | ||
| 30 | augroup END | ||
| 31 | |||
| 32 | " Enable line wrapping | ||
| 33 | set wrap | ||
| 34 | |||
| 35 | " Optional: Make wrapped lines easier to read by indenting them | ||
| 36 | set breakindent | ||
| 37 | set breakindentopt=shift:1 | ||
| 38 | |||
| 39 | syntax on | ||
| 40 | set autoindent | ||
| 41 | set number | ||
| 42 | set mouse=a | ||
| 43 | set expandtab | ||
| 44 | set shiftwidth=2 | ||
| 45 | set softtabstop=2 | ||
| 46 | set tabstop=2 | ||
| 47 | |||
| 48 | set autoindent | ||
| 49 | set smartindent | ||
| 50 | filetype plugin indent on | ||
| 51 | |||
| 52 | set laststatus=2 " permanent status bar | ||
| 53 | set statusline=%F " shows full file path | ||
| 54 | |||
| 55 | EOF | ||
| 56 | 10 | ||
| 57 | tee -a /etc/bashrc > /dev/null << 'EOF2' | 11 | tee -a /etc/bashrc > /dev/null << 'EOF2' |
| 58 | LS_COLORS=$LS_COLORS:'di=38;5;135:' ; export LS_COLORS | 12 | LS_COLORS=$LS_COLORS:'di=38;5;135:ex=00;32:' ; export LS_COLORS |
| 59 | PS1='[\[\033[01;32m\]\u\[\033[00m\]@\h \[\033[38;5;135m\]\W\[\033[00m\]]\$ ' | 13 | PS1='[\[\033[01;32m\]\u\[\033[00m\]@\h \[\033[38;5;135m\]\W\[\033[00m\]]\$ ' |
| 60 | EOF2 | 14 | EOF2 |
| 61 | source /etc/bashrc | 15 | source /etc/bashrc |
