Add IPv6 gateway

The default gateway IP address is supposed to be used by Libre En
Communs for the deployed VM.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2023-09-18 21:08:23 +02:00
parent 9d3a27157e
commit d512df0345
Signed by: GNUtoo
GPG Key ID: 5F5DFCC14177E263
3 changed files with 13 additions and 1 deletions

View File

@ -41,6 +41,7 @@ guix-commit.txt: Makefile
s#VM_IPV4_ADDRESS#$(VM_IPV4_ADDRESS)#g ; \
s#VM_IPV6_ADDRESS#$(VM_IPV6_ADDRESS)#g ; \
s#VM_IPV4_GATEWAY#$(VM_IPV4_GATEWAY)#g ; \
s#VM_IPV6_GATEWAY#$(VM_IPV4_GATEWAY)#g ; \
s#VM_SSH_PUB_KEY#$(VM_SSH_PUB_KEY)#g" $< > $@
%.sh: %.sh.tmpl guix-commit.txt Makefile

View File

@ -28,6 +28,7 @@ AC_SUBST([LETSENCRYPT_EMAIL], [])
AC_SUBST([VM_IPV4_ADDRESS], [])
AC_SUBST([VM_IPV6_ADDRESS], [])
AC_SUBST([VM_IPV4_GATEWAY], [])
AC_SUBST([VM_IPV6_GATEWAY], [])
AC_SUBST([VM_SSH_PUB_KEY], [])
AC_ARG_WITH([domain],
@ -61,6 +62,12 @@ AC_ARG_WITH([vm-ipv4-gateway],
[VM_IPV4_GATEWAY=$withval],
[VM_IPV4_GATEWAY="192.168.0.1"])
AC_ARG_WITH([vm-ipv6-gateway],
[AS_HELP_STRING([--with-vm-ipv6-gateway=VM_IPV6_GATEWAY], [Use custom VM
IPv6 gateway address. (default=192.168.0.1)])],
[VM_IPV6_GATEWAY=$withval],
[VM_IPV6_GATEWAY="2001:910:1021::1"])
AC_ARG_WITH([vm-ssh-public-key],
[AS_HELP_STRING([--with-ssh-vm-public-key=VM_SSH_PUB_KEY], [Use custom VM
SSH public key for use with 'guix deploy'. (default=\
@ -85,4 +92,5 @@ echo " address: $VM_IPV4_ADDRESS"
echo " gateway: $VM_IPV4_GATEWAY"
echo "- VM IPv6 settings:"
echo " address: $VM_IPV6_ADDRESS"
echo " gateway: $VM_IPV6_GATEWAY"
echo "- VM SSH public key: $VM_SSH_PUB_KEY"

View File

@ -193,7 +193,10 @@ https://DOMAIN/
(value "VM_IPV6_ADDRESS"))))
(routes (list (network-route
(destination "default")
(gateway "VM_IPV4_GATEWAY"))))
(gateway "VM_IPV4_GATEWAY"))
(network-route
(destination "default")
(gateway "VM_IPV6_GATEWAY"))))
(name-servers '("192.168.10.1")))))
;; Nginx
(service