diff options
| author | Super User <root@p.noml.ch> | 2026-03-23 19:16:09 +0800 |
|---|---|---|
| committer | Super User <root@p.noml.ch> | 2026-03-23 19:16:09 +0800 |
| commit | 1dab0d9e770466c64b6a822d30307848b710c40c (patch) | |
| tree | 179c6807662c0f96ec964120ec389778999e11df /core | |
| parent | 9fb10a95ff4275ca2b82c18c0ed8600cd5575319 (diff) | |
embed keys, make scripts idempotent
Diffstat (limited to 'core')
| -rwxr-xr-x | core/packages/install_rust.sh | 2 | ||||
| -rwxr-xr-x | core/ssh.sh | 12 |
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 |
| 4 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | 4 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
| 5 | echo '[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"' >> ~/.bashrc | 5 | grep -q 'cargo/env' ~/.bashrc || echo '[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"' >> ~/.bashrc |
| 6 | source "$HOME/.cargo/env" | 6 | source "$HOME/.cargo/env" |
| 7 | cargo install cargo-clone-crate cargo-edit cargo-info evcxr_jupyter bacon du-dust ripgrep bandwhich | 7 | cargo 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 | ||
| 3 | dnf install -y git | 3 | dnf install -y git |
| 4 | 4 | ||
| 5 | echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config | 5 | grep -q 'PasswordAuthentication no' /etc/ssh/sshd_config || echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config |
| 6 | echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config | 6 | grep -q 'AllowTcpForwarding yes' /etc/ssh/sshd_config || echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config |
| 7 | echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config | 7 | grep -q 'GatewayPorts yes' /etc/ssh/sshd_config || echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config |
| 8 | echo "AllowAgentForwarding yes" | sudo tee -a /etc/ssh/sshd_config | 8 | grep -q 'AllowAgentForwarding yes' /etc/ssh/sshd_config || echo "AllowAgentForwarding yes" | sudo tee -a /etc/ssh/sshd_config |
| 9 | 9 | ||
| 10 | git clone https://git.noml.ch/keys/ ~/keys | 10 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
| 11 | ~/keys/add-ssh-keys.sh | 11 | "$SCRIPT_DIR/../keys/add-ssh-keys.sh" |
| 12 | sudo systemctl restart sshd | 12 | sudo systemctl restart sshd |
