2023-09-12 18:55:46 +02:00
|
|
|
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
AC_PREREQ([2.69])
|
|
|
|
AC_INIT([mumble-vm], [0.1], [GNUtoo@cyberdimension.org])
|
|
|
|
AC_CONFIG_SRCDIR([mumble-vm-system.scm.tmpl])
|
|
|
|
AC_PROG_AWK
|
|
|
|
AC_PROG_MKDIR_P
|
|
|
|
AM_INIT_AUTOMAKE([foreign])
|
|
|
|
|
|
|
|
AC_CHECK_PROG([GUIX], [guix], [guix])
|
2023-09-20 14:44:37 +02:00
|
|
|
AS_IF([test x"$GUIX" = x""],
|
|
|
|
[AC_MSG_ERROR([guix was not found in PATH ($PATH)])])
|
|
|
|
|
2023-09-12 18:55:46 +02:00
|
|
|
AC_CHECK_PROG([SED], [sed], [sed])
|
2023-09-20 14:44:37 +02:00
|
|
|
AS_IF([test x"$SED" = x""],
|
|
|
|
[AC_MSG_ERROR([sed was not found in PATH ($PATH)])])
|
2023-09-12 18:55:46 +02:00
|
|
|
|
|
|
|
AC_SUBST([DOMAIN], [])
|
2023-09-18 23:38:35 +02:00
|
|
|
AC_SUBST([ENABLE_WIREGUARD], [])
|
2023-09-12 21:46:34 +02:00
|
|
|
AC_SUBST([LETSENCRYPT_EMAIL], [])
|
2023-09-18 21:08:23 +02:00
|
|
|
AC_SUBST([VM_IPV4_ADDRESS], [])
|
2023-09-18 21:08:23 +02:00
|
|
|
AC_SUBST([VM_IPV6_ADDRESS], [])
|
2023-09-18 21:08:23 +02:00
|
|
|
AC_SUBST([VM_IPV4_GATEWAY], [])
|
2023-09-18 21:08:23 +02:00
|
|
|
AC_SUBST([VM_IPV6_GATEWAY], [])
|
2023-09-18 21:08:23 +02:00
|
|
|
AC_SUBST([VM_IPV4_DNS], [])
|
2023-09-18 21:08:23 +02:00
|
|
|
AC_SUBST([VM_IPV6_DNS], [])
|
2023-09-13 05:27:40 +02:00
|
|
|
AC_SUBST([VM_SSH_PUB_KEY], [])
|
2023-09-18 22:29:35 +02:00
|
|
|
AC_SUBST([VM_SSH_ADDRESS], [])
|
2023-09-12 18:55:46 +02:00
|
|
|
|
|
|
|
AC_ARG_WITH([domain],
|
|
|
|
[AS_HELP_STRING([--with-domain=DOMAIN],
|
|
|
|
[Use custom domain (default=audio.experimental.a-lec.org)])],
|
|
|
|
[DOMAIN=$withval],
|
|
|
|
[DOMAIN=audio.experimental.a-lec.org])
|
|
|
|
|
2023-09-18 23:38:35 +02:00
|
|
|
AC_ARG_ENABLE(wireguard,
|
|
|
|
[AS_HELP_STRING([--enable-wireguard],
|
|
|
|
[Use Wireguard to obtain a public IP address (default=disabled)])],
|
|
|
|
[ENABLE_WIREGUARD="$enableval"],
|
|
|
|
[ENABLE_WIREGUARD="no"])
|
|
|
|
|
2023-09-12 21:46:34 +02:00
|
|
|
AC_ARG_WITH([letsencrypt-email],
|
|
|
|
[AS_HELP_STRING([--with-letsencrypt-email=LETSENCRYPT_EMAIL], [Use
|
|
|
|
custom email address for Let's Encrypt registration and recovery
|
|
|
|
contact. (default=cominfra@a-lec.org)])],
|
|
|
|
[LETSENCRYPT_EMAIL=$withval],
|
|
|
|
[LETSENCRYPT_EMAIL=cominfra@a-lec.org])
|
|
|
|
|
2023-09-18 21:08:23 +02:00
|
|
|
AC_ARG_WITH([vm-ipv4-address],
|
|
|
|
[AS_HELP_STRING([--with-vm-ipv4-address=VM_IPV4_ADDRESS], [Use custom VM
|
2023-10-03 14:11:45 +02:00
|
|
|
IPv4 address. (default=192.168.1.117/16)])],
|
2023-09-18 21:08:23 +02:00
|
|
|
[VM_IPV4_ADDRESS=$withval],
|
2023-10-03 14:11:45 +02:00
|
|
|
[VM_IPV4_ADDRESS="192.168.1.117/16"])
|
2023-09-18 21:08:23 +02:00
|
|
|
|
2023-09-18 21:08:23 +02:00
|
|
|
AC_ARG_WITH([vm-ipv6-address],
|
|
|
|
[AS_HELP_STRING([--with-vm-ipv6-address=VM_IPV6_ADDRESS], [Use custom VM
|
|
|
|
IPv6 address. (default=2001:910:1021::117/64)])],
|
|
|
|
[VM_IPV6_ADDRESS=$withval],
|
|
|
|
[VM_IPV6_ADDRESS="2001:910:1021::117/64"])
|
|
|
|
|
2023-09-18 21:08:23 +02:00
|
|
|
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"])
|
|
|
|
|
2023-09-18 21:08:23 +02:00
|
|
|
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"])
|
|
|
|
|
2023-09-18 21:08:23 +02:00
|
|
|
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"])
|
|
|
|
|
2023-09-18 21:08:23 +02:00
|
|
|
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"])
|
|
|
|
|
2023-09-13 05:27:40 +02:00
|
|
|
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],
|
|
|
|
[VM_SSH_PUB_KEY="\
|
|
|
|
ssh-ed25519\
|
|
|
|
AAAAC3NzaC1lZDI1NTE5AAAAIEjLYbJ+47MTte960IbOUTRzOD012ewt1IZgOOc+NqDa"])
|
|
|
|
|
2023-09-18 22:29:35 +02:00
|
|
|
AC_ARG_WITH([vm-ssh-address],
|
|
|
|
[AS_HELP_STRING([--with-vm-ssh-address=VM_SSH_ADDRESS], [Use custom VM
|
|
|
|
SSH address for use with 'guix deploy'. (default=audio.experimental.a-lec.org)])],
|
|
|
|
[VM_SSH_ADDRESS=$withval],
|
|
|
|
[VM_SSH_ADDRESS="audio.experimental.a-lec.org"])
|
|
|
|
|
2023-09-12 18:55:46 +02:00
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Configuration options:"
|
|
|
|
echo "======================"
|
2023-09-12 21:46:34 +02:00
|
|
|
echo "- Domain: $DOMAIN"
|
|
|
|
echo "- Let's Encrypt email: $LETSENCRYPT_EMAIL"
|
2023-09-18 21:08:23 +02:00
|
|
|
echo "- VM IPv4 settings:"
|
|
|
|
echo " address: $VM_IPV4_ADDRESS"
|
2023-09-18 21:08:23 +02:00
|
|
|
echo " gateway: $VM_IPV4_GATEWAY"
|
2023-09-18 21:08:23 +02:00
|
|
|
echo " DNS: $VM_IPV4_DNS"
|
2023-09-18 21:08:23 +02:00
|
|
|
echo "- VM IPv6 settings:"
|
|
|
|
echo " address: $VM_IPV6_ADDRESS"
|
2023-09-18 21:08:23 +02:00
|
|
|
echo " gateway: $VM_IPV6_GATEWAY"
|
2023-09-18 21:08:23 +02:00
|
|
|
echo " DNS: $VM_IPV6_DNS"
|
2023-09-18 22:29:35 +02:00
|
|
|
echo "- SSH settings:"
|
|
|
|
echo " public key: $VM_SSH_PUB_KEY"
|
|
|
|
echo " address: $VM_SSH_ADDRESS"
|
2023-09-18 23:38:35 +02:00
|
|
|
AS_IF([test x"$ENABLE_WIREGUARD" = x"yes"],
|
|
|
|
[echo "- Wireguard: enabled"],
|
|
|
|
[echo "- Wireguard: disabled"])
|