Make the VM DNS IPv4 configurable
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:
parent
d512df0345
commit
c5d394f0f6
|
@ -42,6 +42,7 @@ guix-commit.txt: Makefile
|
||||||
s#VM_IPV6_ADDRESS#$(VM_IPV6_ADDRESS)#g ; \
|
s#VM_IPV6_ADDRESS#$(VM_IPV6_ADDRESS)#g ; \
|
||||||
s#VM_IPV4_GATEWAY#$(VM_IPV4_GATEWAY)#g ; \
|
s#VM_IPV4_GATEWAY#$(VM_IPV4_GATEWAY)#g ; \
|
||||||
s#VM_IPV6_GATEWAY#$(VM_IPV4_GATEWAY)#g ; \
|
s#VM_IPV6_GATEWAY#$(VM_IPV4_GATEWAY)#g ; \
|
||||||
|
s#VM_IPV4_DNS#$(VM_IPV4_DNS)#g ; \
|
||||||
s#VM_SSH_PUB_KEY#$(VM_SSH_PUB_KEY)#g" $< > $@
|
s#VM_SSH_PUB_KEY#$(VM_SSH_PUB_KEY)#g" $< > $@
|
||||||
|
|
||||||
%.sh: %.sh.tmpl guix-commit.txt Makefile
|
%.sh: %.sh.tmpl guix-commit.txt Makefile
|
||||||
|
|
|
@ -29,6 +29,7 @@ AC_SUBST([VM_IPV4_ADDRESS], [])
|
||||||
AC_SUBST([VM_IPV6_ADDRESS], [])
|
AC_SUBST([VM_IPV6_ADDRESS], [])
|
||||||
AC_SUBST([VM_IPV4_GATEWAY], [])
|
AC_SUBST([VM_IPV4_GATEWAY], [])
|
||||||
AC_SUBST([VM_IPV6_GATEWAY], [])
|
AC_SUBST([VM_IPV6_GATEWAY], [])
|
||||||
|
AC_SUBST([VM_IPV4_DNS], [])
|
||||||
AC_SUBST([VM_SSH_PUB_KEY], [])
|
AC_SUBST([VM_SSH_PUB_KEY], [])
|
||||||
|
|
||||||
AC_ARG_WITH([domain],
|
AC_ARG_WITH([domain],
|
||||||
|
@ -68,6 +69,12 @@ AC_ARG_WITH([vm-ipv6-gateway],
|
||||||
[VM_IPV6_GATEWAY=$withval],
|
[VM_IPV6_GATEWAY=$withval],
|
||||||
[VM_IPV6_GATEWAY="2001:910:1021::1"])
|
[VM_IPV6_GATEWAY="2001:910:1021::1"])
|
||||||
|
|
||||||
|
AC_ARG_WITH([vm-ipv4-dns],
|
||||||
|
[AS_HELP_STRING([--with-vm-ipv4-dns=VM_IPV4_DNS], [Use custom VM
|
||||||
|
IPv4 dns address. (default=192.168.0.1)])],
|
||||||
|
[VM_IPV4_DNS=$withval],
|
||||||
|
[VM_IPV4_DNS="192.168.0.1"])
|
||||||
|
|
||||||
AC_ARG_WITH([vm-ssh-public-key],
|
AC_ARG_WITH([vm-ssh-public-key],
|
||||||
[AS_HELP_STRING([--with-ssh-vm-public-key=VM_SSH_PUB_KEY], [Use custom VM
|
[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 public key for use with 'guix deploy'. (default=\
|
||||||
|
@ -90,6 +97,7 @@ echo "- Let's Encrypt email: $LETSENCRYPT_EMAIL"
|
||||||
echo "- VM IPv4 settings:"
|
echo "- VM IPv4 settings:"
|
||||||
echo " address: $VM_IPV4_ADDRESS"
|
echo " address: $VM_IPV4_ADDRESS"
|
||||||
echo " gateway: $VM_IPV4_GATEWAY"
|
echo " gateway: $VM_IPV4_GATEWAY"
|
||||||
|
echo " DNS: $VM_IPV4_DNS"
|
||||||
echo "- VM IPv6 settings:"
|
echo "- VM IPv6 settings:"
|
||||||
echo " address: $VM_IPV6_ADDRESS"
|
echo " address: $VM_IPV6_ADDRESS"
|
||||||
echo " gateway: $VM_IPV6_GATEWAY"
|
echo " gateway: $VM_IPV6_GATEWAY"
|
||||||
|
|
|
@ -197,7 +197,7 @@ https://DOMAIN/
|
||||||
(network-route
|
(network-route
|
||||||
(destination "default")
|
(destination "default")
|
||||||
(gateway "VM_IPV6_GATEWAY"))))
|
(gateway "VM_IPV6_GATEWAY"))))
|
||||||
(name-servers '("192.168.10.1")))))
|
(name-servers '("VM_IPV4_DNS")))))
|
||||||
;; Nginx
|
;; Nginx
|
||||||
(service
|
(service
|
||||||
nginx-service-type
|
nginx-service-type
|
||||||
|
|
Loading…
Reference in New Issue