From e8461e398cae787b5bc7dafe274365c1818dd450 Mon Sep 17 00:00:00 2001 From: awkawb Date: Fri, 27 Sep 2024 08:49:53 -0400 Subject: [PATCH] Changed Makefile * build-vm target is more reproducible * boot-vm target now forward host port 8080 to vm port 80 --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 883248a..3f6b092 100644 --- a/Makefile +++ b/Makefile @@ -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