Make the VM SSH address configurable

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2023-09-18 22:29:35 +02:00
parent 058dc74299
commit 251664e2e9
Signed by: GNUtoo
GPG Key ID: 5F5DFCC14177E263
3 changed files with 15 additions and 4 deletions

View File

@ -44,12 +44,14 @@ guix-commit.txt: Makefile
s#VM_IPV6_GATEWAY#$(VM_IPV4_GATEWAY)#g ; \
s#VM_IPV4_DNS#$(VM_IPV4_DNS)#g ; \
s#VM_IPV6_DNS#$(VM_IPV6_DNS)#g ; \
s#VM_SSH_PUB_KEY#$(VM_SSH_PUB_KEY)#g" $< > $@
s#VM_SSH_PUB_KEY#$(VM_SSH_PUB_KEY)#g ; \
s#VM_SSH_ADDRESS#$(VM_SSH_ADDRESS)#g" $< > $@
%.sh: %.sh.tmpl guix-commit.txt Makefile
sed \
"s#DOMAIN#$(DOMAIN)#g ; \
s#LETSENCRYPT_EMAIL#$(LETSENCRYPT_EMAIL)#g" $< > $@
s#LETSENCRYPT_EMAIL#$(LETSENCRYPT_EMAIL)#g ; \
s#VM_SSH_ADDRESS#$(VM_SSH_ADDRESS)#g" $< > $@
chmod +x $@
IMAGE_SOURCE = \

View File

@ -32,6 +32,7 @@ AC_SUBST([VM_IPV6_GATEWAY], [])
AC_SUBST([VM_IPV4_DNS], [])
AC_SUBST([VM_IPV6_DNS], [])
AC_SUBST([VM_SSH_PUB_KEY], [])
AC_SUBST([VM_SSH_ADDRESS], [])
AC_ARG_WITH([domain],
[AS_HELP_STRING([--with-domain=DOMAIN],
@ -92,6 +93,12 @@ ssh-ed25519\
ssh-ed25519\
AAAAC3NzaC1lZDI1NTE5AAAAIEjLYbJ+47MTte960IbOUTRzOD012ewt1IZgOOc+NqDa"])
AC_ARG_WITH([vm-ssh-address],
[AS_HELP_STRING([--with-vm-ssh-address=VM_SSH_ADDRESS], [Use custom VM
SSH address for use with 'guix deploy'. (default=audio.experimental.a-lec.org)])],
[VM_SSH_ADDRESS=$withval],
[VM_SSH_ADDRESS="audio.experimental.a-lec.org"])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
@ -108,4 +115,6 @@ echo "- VM IPv6 settings:"
echo " address: $VM_IPV6_ADDRESS"
echo " gateway: $VM_IPV6_GATEWAY"
echo " DNS: $VM_IPV6_DNS"
echo "- VM SSH public key: $VM_SSH_PUB_KEY"
echo "- SSH settings:"
echo " public key: $VM_SSH_PUB_KEY"
echo " address: $VM_SSH_ADDRESS"

View File

@ -28,7 +28,7 @@
(build-locally? #f)
(host-key
"VM_SSH_PUB_KEY")
(host-name "DOMAIN")
(host-name "VM_SSH_ADDRESS")
(identity "./id_ed25519")
(port 222)
(system "x86_64-linux")