Add VM DNS IPv6

The default DNS server 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 c5d394f0f6
commit 058dc74299
Signed by: GNUtoo
GPG Key ID: 5F5DFCC14177E263
3 changed files with 10 additions and 2 deletions

View File

@ -43,6 +43,7 @@ guix-commit.txt: Makefile
s#VM_IPV4_GATEWAY#$(VM_IPV4_GATEWAY)#g ; \
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" $< > $@
%.sh: %.sh.tmpl guix-commit.txt Makefile

View File

@ -30,6 +30,7 @@ AC_SUBST([VM_IPV6_ADDRESS], [])
AC_SUBST([VM_IPV4_GATEWAY], [])
AC_SUBST([VM_IPV6_GATEWAY], [])
AC_SUBST([VM_IPV4_DNS], [])
AC_SUBST([VM_IPV6_DNS], [])
AC_SUBST([VM_SSH_PUB_KEY], [])
AC_ARG_WITH([domain],
@ -75,10 +76,15 @@ AC_ARG_WITH([vm-ipv4-dns],
[VM_IPV4_DNS=$withval],
[VM_IPV4_DNS="192.168.0.1"])
AC_ARG_WITH([vm-ipv6-dns],
[AS_HELP_STRING([--with-vm-ipv6-dns=VM_IPV6_DNS], [Use custom VM
IPv6 dns address. (default=2001:910:1021::1)])],
[VM_IPV6_DNS=$withval],
[VM_IPV6_DNS="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=\
ssh-ed25519\
AAAAC3NzaC1lZDI1NTE5AAAAIEjLYbJ+47MTte960IbOUTRzOD012ewt1IZgOOc+NqDa)])],
[VM_SSH_PUB_KEY=$withval],
@ -101,4 +107,5 @@ echo " DNS: $VM_IPV4_DNS"
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"

View File

@ -197,7 +197,7 @@ https://DOMAIN/
(network-route
(destination "default")
(gateway "VM_IPV6_GATEWAY"))))
(name-servers '("VM_IPV4_DNS")))))
(name-servers (list "VM_IPV4_DNS" "VM_IPV6_DNS")))))
;; Nginx
(service
nginx-service-type