diff --git a/bash_scripts/cloud-init-populate.sh b/bash_scripts/cloud-init-populate.sh index 91b62a1..393a9f1 100755 --- a/bash_scripts/cloud-init-populate.sh +++ b/bash_scripts/cloud-init-populate.sh @@ -5,8 +5,9 @@ PUB_KEYS=($(ls ~/.ssh/*.pub | xargs -d '\n' -n 1 basename)) set -a WRAPPER_SCRIPT=$(base64 $BASE_DIR/bash_scripts/ddns-acme-porkbun.sh -w 0) DDNS_SCRIPT=$(base64 $BASE_DIR/python_scripts/ddns-porkbun.py -w 0) +WG_CONF_BASE=$(base64 $BASE_DIR/basic_configs/wg_base.conf -w 0) +NGINX_CONF=$(base64 $BASE_DIR/basic_configs/nginx-vps/nginx.conf -w 0) read -p "VPS Username: " TARGET_USERNAME -echo $PUB_KEYS select key_file in $PUB_KEYS do SSH_PUB_KEY=$(cat ~/.ssh/$key_file) diff --git a/basic_configs/debian-hetzner-init.yaml b/basic_configs/debian-hetzner-init.yaml index ffac496..fea39b7 100644 --- a/basic_configs/debian-hetzner-init.yaml +++ b/basic_configs/debian-hetzner-init.yaml @@ -52,6 +52,14 @@ write-files: owner: root:root path: /usr/local/bin/ddns-acme-porkbun.timer permissions: '0644' + - encoding: b64 + content: ${WG_CONF_BASE} + owner: root:root + path: /etc/wireguard/wg0.conf + permissions: '0600' + - encoding: b64 + content: ${NGINX_CONF} + owner: root:root + path: /etc/nginx/nginx.conf + permissions: '0644' -runcmd: - - reboot