diff options
| author | hc <hc@email.ch> | 2025-06-25 19:40:43 +0800 |
|---|---|---|
| committer | hc <hc@email.ch> | 2025-06-25 19:40:43 +0800 |
| commit | ccdde5f4424836fc8e9cc98c204510fed9612e70 (patch) | |
| tree | df1500f00b2f0b32b8729732454585c318b51110 /setup/core | |
| parent | d6eb567da3e6d2e64ebf22adf1fc6d21c47090f8 (diff) | |
merged setup and contaienrs
Diffstat (limited to 'setup/core')
| -rwxr-xr-x | setup/core/install-packages.sh | 27 | ||||
| -rwxr-xr-x | setup/core/packages/install_claude.sh | 8 | ||||
| -rwxr-xr-x | setup/core/packages/install_rust.sh | 7 | ||||
| -rwxr-xr-x | setup/core/ssh.sh | 9 | ||||
| -rwxr-xr-x | setup/core/vim.sh | 59 |
5 files changed, 110 insertions, 0 deletions
diff --git a/setup/core/install-packages.sh b/setup/core/install-packages.sh new file mode 100755 index 0000000..dd3e69d --- /dev/null +++ b/setup/core/install-packages.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Install core packages +sudo dnf install -y epel-release +#sudo dnf group install -y "Development Tools" +sudo dnf install -y nc openssl bat autossh tmux htop tar bmon gzip tree wget curl plocate nano vim unzip net-tools git python3 python3-pip make wireguard-tools usbutils yum +sudo dnf install -y xclip + +sudo dnf install -y gcc gcc-c++ +sudo dnf install -y java-latest-openjdk-devel +#sudo dnf install -y asio-devel boost-devel openssl-devel + +# Execute all package installation scripts +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +for script in "$SCRIPT_DIR/packages"/*.sh; do + if [ -f "$script" ]; then + "$script" + fi +done + +#install packages ml +#pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 +#pip3 install transformers + +#sudo yum install -y python3-openstackclient s3fs-fuse awscli +#pip install jupyterlab python-swiftclient +#sudo dnf update -y diff --git a/setup/core/packages/install_claude.sh b/setup/core/packages/install_claude.sh new file mode 100755 index 0000000..bf47cd2 --- /dev/null +++ b/setup/core/packages/install_claude.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Install Node.js via nvm and Claude Code +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +nvm install 22 +npm install -g @anthropic-ai/claude-code
\ No newline at end of file diff --git a/setup/core/packages/install_rust.sh b/setup/core/packages/install_rust.sh new file mode 100755 index 0000000..ec484a4 --- /dev/null +++ b/setup/core/packages/install_rust.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Install Rust and Cargo tools +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +echo '[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"' >> ~/.bashrc +source "$HOME/.cargo/env" +cargo install cargo-clone-crate cargo-edit cargo-info evcxr_jupyter bacon du-dust
\ No newline at end of file diff --git a/setup/core/ssh.sh b/setup/core/ssh.sh new file mode 100755 index 0000000..c8fb49d --- /dev/null +++ b/setup/core/ssh.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +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 +echo "AllowAgentForwarding yes" | sudo tee -a /etc/ssh/sshd_config + +git clone https://git.noml.ch/keys ~/keys +~/keys/add-ssh-keys.sh diff --git a/setup/core/vim.sh b/setup/core/vim.sh new file mode 100755 index 0000000..883a75e --- /dev/null +++ b/setup/core/vim.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +cd "$(dirname "${BASH_SOURCE[0]}")" || exit + +cat << EOF >> /etc/vimrc +augroup netcat_clipboard + au! + au TextYankPost * call system("openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023", @") +augroup END + +" Enable line wrapping +set wrap + +" Optional: Make wrapped lines easier to read by indenting them +set breakindent +set breakindentopt=shift:1 + +syntax on +set mouse=a +set expandtab +set shiftwidth=4 +set softtabstop=4 +set tabstop=4 +set noautoindent +set nosmartindent +filetype plugin indent on + +set laststatus=2 " permanent status bar +set statusline=%F " shows full file path + +if (has("termguicolors")) + set termguicolors +endif + +"colorscheme murphy +colorscheme zellner + +" Ctrl+A: Move to the beginning of the line in INSERT mode +inoremap <C-a> <Home> + +" Ctrl+E: Move to the end of the line in INSERT mode +inoremap <C-e> <End> + +" Ctrl+A: Move to the beginning of the line in NORMAL mode +nnoremap <C-a> 0 + +" Ctrl+E: Move to the end of the line in NORMAL mode +nnoremap <C-e> $ + +set number +setlocal regexpengine=2 +set paste +set foldcolumn=12 + + +EOF + + + |
