summaryrefslogtreecommitdiff
path: root/setup/core
diff options
context:
space:
mode:
authorhc <hc@email.ch>2025-06-25 19:40:43 +0800
committerhc <hc@email.ch>2025-06-25 19:40:43 +0800
commitccdde5f4424836fc8e9cc98c204510fed9612e70 (patch)
treedf1500f00b2f0b32b8729732454585c318b51110 /setup/core
parentd6eb567da3e6d2e64ebf22adf1fc6d21c47090f8 (diff)
merged setup and contaienrs
Diffstat (limited to 'setup/core')
-rwxr-xr-xsetup/core/install-packages.sh27
-rwxr-xr-xsetup/core/packages/install_claude.sh8
-rwxr-xr-xsetup/core/packages/install_rust.sh7
-rwxr-xr-xsetup/core/ssh.sh9
-rwxr-xr-xsetup/core/vim.sh59
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 @@
1#!/bin/bash
2
3# Install core packages
4sudo dnf install -y epel-release
5#sudo dnf group install -y "Development Tools"
6sudo 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
7sudo dnf install -y xclip
8
9sudo dnf install -y gcc gcc-c++
10sudo dnf install -y java-latest-openjdk-devel
11#sudo dnf install -y asio-devel boost-devel openssl-devel
12
13# Execute all package installation scripts
14SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
15for script in "$SCRIPT_DIR/packages"/*.sh; do
16 if [ -f "$script" ]; then
17 "$script"
18 fi
19done
20
21#install packages ml
22#pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
23#pip3 install transformers
24
25#sudo yum install -y python3-openstackclient s3fs-fuse awscli
26#pip install jupyterlab python-swiftclient
27#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 @@
1#!/bin/bash
2
3# Install Node.js via nvm and Claude Code
4curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
5export NVM_DIR="$HOME/.nvm"
6[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
7nvm install 22
8npm 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 @@
1#!/bin/bash
2
3# Install Rust and Cargo tools
4curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
5echo '[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"' >> ~/.bashrc
6source "$HOME/.cargo/env"
7cargo 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 @@
1#!/bin/bash
2
3echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config
4echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config
5echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config
6echo "AllowAgentForwarding yes" | sudo tee -a /etc/ssh/sshd_config
7
8git clone https://git.noml.ch/keys ~/keys
9~/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 @@
1#!/bin/bash
2
3cd "$(dirname "${BASH_SOURCE[0]}")" || exit
4
5cat << EOF >> /etc/vimrc
6augroup netcat_clipboard
7 au!
8 au TextYankPost * call system("openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023", @")
9augroup END
10
11" Enable line wrapping
12set wrap
13
14" Optional: Make wrapped lines easier to read by indenting them
15set breakindent
16set breakindentopt=shift:1
17
18syntax on
19set mouse=a
20set expandtab
21set shiftwidth=4
22set softtabstop=4
23set tabstop=4
24set noautoindent
25set nosmartindent
26filetype plugin indent on
27
28set laststatus=2 " permanent status bar
29set statusline=%F " shows full file path
30
31if (has("termguicolors"))
32 set termguicolors
33endif
34
35"colorscheme murphy
36colorscheme zellner
37
38" Ctrl+A: Move to the beginning of the line in INSERT mode
39inoremap <C-a> <Home>
40
41" Ctrl+E: Move to the end of the line in INSERT mode
42inoremap <C-e> <End>
43
44" Ctrl+A: Move to the beginning of the line in NORMAL mode
45nnoremap <C-a> 0
46
47" Ctrl+E: Move to the end of the line in NORMAL mode
48nnoremap <C-e> $
49
50set number
51setlocal regexpengine=2
52set paste
53set foldcolumn=12
54
55
56EOF
57
58
59