From 0832b4962ea64d3b84eb8fa2aa9570fd74adce41 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Sat, 28 Dec 2024 22:29:29 -0600 Subject: [PATCH] task | add targets to run vm and build bootiso --- justfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index 9d281c8..545ebd3 100644 --- a/justfile +++ b/justfile @@ -32,11 +32,20 @@ web: @colmena --impure apply --on @web # Build and run a vm FIXME -vm: +vm hostname=(HOSTNAME): + @doas rm -f result @nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false) @rm -f nixos-switch.log @echo Running iso build - @nix build --impure ./#nixosConfigurations.vm.config.system.build.isoImage &> nixos-switch.log || ( grep -E --color '(error|For full logs)' nixos-switch.log && false) + @nixos-rebuild build-vm --flake .#{{hostname}} + export QEMU_NET_OPTS="hostfwd=tcp::2221-:22" + result/bin/run-{{hostname}}-vm + +bootiso: + @nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false) + @rm -f nixos-switch.log result + @echo Running iso build + @doas nix build --impure ./#nixosConfigurations.vm.config.system.build.isoImage &> nixos-switch.log || ( grep -E --color '(error|For full logs)' nixos-switch.log && false) # Stuff to do weekly weekly: pull clean update world ci push clean-world