Changed Makefile

* build-vm target is more reproducible
* boot-vm target now forward host port 8080 to vm port 80
This commit is contained in:
Andrew Bryant 2024-09-27 08:49:53 -04:00
parent 553674743b
commit e8461e398c

View File

@ -35,10 +35,13 @@ clean: ## Clean build artifacts and shutdown running virtual machines
exit 0
build-vm: clean ## Build virtual machine for testing
nixos-rebuild build-vm -I nixos-config=./tests/test-config.nix
nixos-rebuild build-vm \
-I nixpkgs=http://nixos.org/channels/nixos-24.05/nixexprs.tar.xz \
-I nixos-config=./tests/test-config.nix
boot-vm: ## Run virtual machine in current terminal
QEMU_KERNEL_PARAMS=console=ttyS0 \
QEMU_NET_OPTS=hostfwd=tcp::8080-:80 \
./result/bin/run-nixos-vm \
-nographic; \
reset