From d512df0345eb599b4f94168acaf113ef923e2737 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Mon, 18 Sep 2023 21:08:23 +0200 Subject: [PATCH] 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 --- Makefile.am | 1 + configure.ac | 8 ++++++++ mumble-vm-system.scm.tmpl | 5 ++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 793a6fe..2749c89 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index bdee230..fd906cc 100644 --- a/configure.ac +++ b/configure.ac @@ -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" diff --git a/mumble-vm-system.scm.tmpl b/mumble-vm-system.scm.tmpl index c2cb71e..1abf163 100644 --- a/mumble-vm-system.scm.tmpl +++ b/mumble-vm-system.scm.tmpl @@ -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