umorpha-boxes/modules/base-eclipse-creds.sh

28 lines
734 B
Bash
Raw Normal View History

2024-01-22 22:30:22 +00:00
#!/hint/bash -euE
# Copyright (C) 2024 Umorpha Systems
# SPDX-License-Identifier: AGPL-3.0-or-later
packages+=(
openssh
)
post_install+=(20:eclipse-creds:post_install)
eclipse-creds:post_install() {
local arg_mountpoint=$1
install -Dm644 /dev/stdin "$arg_mountpoint/var/lib/eclipse/.ssh/config" <<-'EOF'
# Copyright (C) 2024 Umorpha Systems
# SPDX-License-Identifier: AGPL-3.0-or-later
Host *
IdentityFile /etc/umorpha-secrets/eclipse-sshkey.priv
StrictHostKeyChecking accept-new
EOF
install -Dm644 /dev/stdin "$arg_mountpoint/etc/tmpfiles.d/eclipse-creds.conf" <<-'EOF'
# Copyright (C) 2024 Umorpha Systems
# SPDX-License-Identifier: AGPL-3.0-or-later
Z /var/lib/eclipse - eclipse eclipse
EOF
}