summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorSuper User <root@p.noml.ch>2026-03-23 19:16:09 +0800
committerSuper User <root@p.noml.ch>2026-03-23 19:16:09 +0800
commit1dab0d9e770466c64b6a822d30307848b710c40c (patch)
tree179c6807662c0f96ec964120ec389778999e11df /core
parent9fb10a95ff4275ca2b82c18c0ed8600cd5575319 (diff)
embed keys, make scripts idempotent
Diffstat (limited to 'core')
-rwxr-xr-xcore/packages/install_rust.sh2
-rwxr-xr-xcore/ssh.sh12
2 files changed, 7 insertions, 7 deletions
diff --git a/core/packages/install_rust.sh b/core/packages/install_rust.sh
index 921a533..a0b0728 100755
--- a/core/packages/install_rust.sh
+++ b/core/packages/install_rust.sh
@@ -2,6 +2,6 @@
2 2
3# Install Rust and Cargo tools 3# Install Rust and Cargo tools
4curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 4curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
5echo '[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"' >> ~/.bashrc 5grep -q 'cargo/env' ~/.bashrc || echo '[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"' >> ~/.bashrc
6source "$HOME/.cargo/env" 6source "$HOME/.cargo/env"
7cargo install cargo-clone-crate cargo-edit cargo-info evcxr_jupyter bacon du-dust ripgrep bandwhich 7cargo install cargo-clone-crate cargo-edit cargo-info evcxr_jupyter bacon du-dust ripgrep bandwhich
diff --git a/core/ssh.sh b/core/ssh.sh
index c4454ae..f23d571 100755
--- a/core/ssh.sh
+++ b/core/ssh.sh
@@ -2,11 +2,11 @@
2 2
3dnf install -y git 3dnf install -y git
4 4
5echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config 5grep -q 'PasswordAuthentication no' /etc/ssh/sshd_config || echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config
6echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config 6grep -q 'AllowTcpForwarding yes' /etc/ssh/sshd_config || echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config
7echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config 7grep -q 'GatewayPorts yes' /etc/ssh/sshd_config || echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config
8echo "AllowAgentForwarding yes" | sudo tee -a /etc/ssh/sshd_config 8grep -q 'AllowAgentForwarding yes' /etc/ssh/sshd_config || echo "AllowAgentForwarding yes" | sudo tee -a /etc/ssh/sshd_config
9 9
10git clone https://git.noml.ch/keys/ ~/keys 10SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11~/keys/add-ssh-keys.sh 11"$SCRIPT_DIR/../keys/add-ssh-keys.sh"
12sudo systemctl restart sshd 12sudo systemctl restart sshd