Make the VM gateway IPv4 configurable
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:
parent
52e483228f
commit
9d3a27157e
|
@ -40,6 +40,7 @@ guix-commit.txt: Makefile
|
|||
s#LETSENCRYPT_EMAIL#$(LETSENCRYPT_EMAIL)#g ; \
|
||||
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_SSH_PUB_KEY#$(VM_SSH_PUB_KEY)#g" $< > $@
|
||||
|
||||
%.sh: %.sh.tmpl guix-commit.txt Makefile
|
||||
|
|
|
@ -27,6 +27,7 @@ AC_SUBST([DOMAIN], [])
|
|||
AC_SUBST([LETSENCRYPT_EMAIL], [])
|
||||
AC_SUBST([VM_IPV4_ADDRESS], [])
|
||||
AC_SUBST([VM_IPV6_ADDRESS], [])
|
||||
AC_SUBST([VM_IPV4_GATEWAY], [])
|
||||
AC_SUBST([VM_SSH_PUB_KEY], [])
|
||||
|
||||
AC_ARG_WITH([domain],
|
||||
|
@ -54,6 +55,12 @@ AC_ARG_WITH([vm-ipv6-address],
|
|||
[VM_IPV6_ADDRESS=$withval],
|
||||
[VM_IPV6_ADDRESS="2001:910:1021::117/64"])
|
||||
|
||||
AC_ARG_WITH([vm-ipv4-gateway],
|
||||
[AS_HELP_STRING([--with-vm-ipv4-gateway=VM_IPV4_GATEWAY], [Use custom VM
|
||||
IPv4 gateway address. (default=192.168.0.1)])],
|
||||
[VM_IPV4_GATEWAY=$withval],
|
||||
[VM_IPV4_GATEWAY="192.168.0.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=\
|
||||
|
@ -75,6 +82,7 @@ echo "- Domain: $DOMAIN"
|
|||
echo "- Let's Encrypt email: $LETSENCRYPT_EMAIL"
|
||||
echo "- VM IPv4 settings:"
|
||||
echo " address: $VM_IPV4_ADDRESS"
|
||||
echo " gateway: $VM_IPV4_GATEWAY"
|
||||
echo "- VM IPv6 settings:"
|
||||
echo " address: $VM_IPV6_ADDRESS"
|
||||
echo "- VM SSH public key: $VM_SSH_PUB_KEY"
|
||||
|
|
|
@ -193,7 +193,7 @@ https://DOMAIN/
|
|||
(value "VM_IPV6_ADDRESS"))))
|
||||
(routes (list (network-route
|
||||
(destination "default")
|
||||
(gateway "192.168.10.1"))))
|
||||
(gateway "VM_IPV4_GATEWAY"))))
|
||||
(name-servers '("192.168.10.1")))))
|
||||
;; Nginx
|
||||
(service
|
||||
|
|
Loading…
Reference in New Issue