Make the VM SSH public key configurable
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
parent
669c708331
commit
67922b0c13
|
@ -36,7 +36,8 @@ guix-commit.txt: Makefile
|
|||
%.scm: %.scm.tmpl guix-commit.txt Makefile
|
||||
sed \
|
||||
"s#DOMAIN#$(DOMAIN)#g ; \
|
||||
s#LETSENCRYPT_EMAIL#$(LETSENCRYPT_EMAIL)#g" $< > $@
|
||||
s#LETSENCRYPT_EMAIL#$(LETSENCRYPT_EMAIL)#g ; \
|
||||
s#VM_SSH_PUB_KEY#$(VM_SSH_PUB_KEY)#g" $< > $@
|
||||
|
||||
IMAGE_SOURCE = \
|
||||
guix-commit.txt \
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -25,6 +25,7 @@ AC_CHECK_PROG([SED], [sed], [sed])
|
|||
|
||||
AC_SUBST([DOMAIN], [])
|
||||
AC_SUBST([LETSENCRYPT_EMAIL], [])
|
||||
AC_SUBST([VM_SSH_PUB_KEY], [])
|
||||
|
||||
AC_ARG_WITH([domain],
|
||||
[AS_HELP_STRING([--with-domain=DOMAIN],
|
||||
|
@ -39,6 +40,16 @@ AC_ARG_WITH([letsencrypt-email],
|
|||
[LETSENCRYPT_EMAIL=$withval],
|
||||
[LETSENCRYPT_EMAIL=cominfra@a-lec.org])
|
||||
|
||||
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"])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
|
@ -47,3 +58,4 @@ echo "Configuration options:"
|
|||
echo "======================"
|
||||
echo "- Domain: $DOMAIN"
|
||||
echo "- Let's Encrypt email: $LETSENCRYPT_EMAIL"
|
||||
echo "- VM SSH public key: $VM_SSH_PUB_KEY"
|
||||
|
|
|
@ -27,10 +27,7 @@
|
|||
(authorize? #t)
|
||||
(build-locally? #f)
|
||||
(host-key
|
||||
(string-append
|
||||
"ssh-ed25519"
|
||||
" "
|
||||
"AAAABBBBCCCCDDDDEEEEFFFFF1111222233334444555566667777888899990000ABC"))
|
||||
"VM_SSH_PUB_KEY")
|
||||
(host-name "DOMAIN")
|
||||
(identity "./id_ed25519")
|
||||
(port 222)
|
||||
|
|
Loading…
Reference in New Issue