experimental-vms/Makefile

41 lines
1.0 KiB
Makefile

# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
#
# This file 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.
#
# You should have received a copy of the GNU General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
DESTDIR ?= .
.PHONY: all help install update $(DESTDIR)/mumble-vm.img
IMAGE_SOURCE = \
mumble-vm-system.scm \
id_ed25519.pub \
Makefile \
signing-key.pub
all: help
help:
@printf "Available commands:\n\
make help # prints this help\n\
make install # install image to $(DESTDIR)/ \n\
make deploy # update existing vm with guix deploy through SSH\n\
"
$(DESTDIR)/mumble-vm.img: $(IMAGE_SOURCE)
sudo install \
`guix system image \
--image-type=mbr-raw \
--image-size=6G mumble-vm-system.scm` \
$@
install: $(DESTDIR)/mumble-vm.img
deploy:
guix deploy -L . mumble-vm-machine.scm