diff options
| author | hc <hc@email.ch> | 2024-10-02 08:55:26 +0800 |
|---|---|---|
| committer | hc <hc@email.ch> | 2024-10-02 08:55:26 +0800 |
| commit | 809a9229b68f4b1385915c152a49e69ebee963a7 (patch) | |
| tree | 7376437384b8557efac1fa93dc66f985437a1b80 /setup.sh | |
| parent | d1a8ea228181575ee5d3c4d96497c703e83800f7 (diff) | |
fix
Diffstat (limited to 'setup.sh')
| -rwxr-xr-x | setup.sh | 19 |
1 files changed, 10 insertions, 9 deletions
| @@ -5,21 +5,15 @@ echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config | |||
| 5 | echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config | 5 | echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config |
| 6 | 6 | ||
| 7 | sudo dnf install -y git | 7 | sudo dnf install -y git |
| 8 | git clone https://git.0nom.ch/keys ~/ | 8 | git clone https://git.0nom.ch/keys ~/keys |
| 9 | mkdir -p "~/.ssh" | 9 | ~/keys/add-ssh-keys.sh |
| 10 | touch "~/.ssh/authorized_keys" | ||
| 11 | find "~/keys" -name "*.pub" -type f -print0 | while IFS= read -r -d '' file; do | ||
| 12 | echo "Adding key from file: $file" | ||
| 13 | cat "$file" >> "~/.ssh/authorized_keys" | ||
| 14 | echo "" >> "~/.ssh/authorized_keys" # Add a newline after each key | ||
| 15 | done | ||
| 16 | 10 | ||
| 17 | #install packages | 11 | #install packages |
| 18 | sudo dnf install -y epel-release dnf-utils | 12 | sudo dnf install -y epel-release dnf-utils |
| 19 | 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 | 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 |
| 20 | #sudo yum install -y python3-openstackclient s3fs-fuse awscli | 14 | #sudo yum install -y python3-openstackclient s3fs-fuse awscli |
| 21 | #pip install jupyterlab python-swiftclient | 15 | #pip install jupyterlab python-swiftclient |
| 22 | sudo dnf update -y | 16 | #sudo dnf update -y |
| 23 | 17 | ||
| 24 | cat << EOF >> /etc/vimrc | 18 | cat << EOF >> /etc/vimrc |
| 25 | augroup netcat_clipboard | 19 | augroup netcat_clipboard |
| @@ -34,6 +28,7 @@ set wrap | |||
| 34 | set breakindent | 28 | set breakindent |
| 35 | set breakindentopt=shift:3 | 29 | set breakindentopt=shift:3 |
| 36 | 30 | ||
| 31 | syntax on | ||
| 37 | set autoindent | 32 | set autoindent |
| 38 | set number | 33 | set number |
| 39 | set mouse=a | 34 | set mouse=a |
| @@ -41,8 +36,14 @@ set expandtab | |||
| 41 | set shiftwidth=2 | 36 | set shiftwidth=2 |
| 42 | set softtabstop=2 | 37 | set softtabstop=2 |
| 43 | set tabstop=2 | 38 | set tabstop=2 |
| 39 | syntax on | ||
| 44 | EOF | 40 | EOF |
| 45 | 41 | ||
| 46 | # add check fro each component | 42 | # add check fro each component |
| 47 | 43 | ||
| 48 | # then git clone work directory, or git clone altogether | 44 | # then git clone work directory, or git clone altogether |
| 45 | |||
| 46 | |||
| 47 | |||
| 48 | |||
| 49 | |||
