task | add targets to run vm and build bootiso

This commit is contained in:
Don Harper 2024-12-28 22:29:29 -06:00
parent 81d75cae7f
commit 0832b4962e

View file

@ -32,11 +32,20 @@ web:
@colmena --impure apply --on @web @colmena --impure apply --on @web
# Build and run a vm FIXME # Build and run a vm FIXME
vm: vm hostname=(HOSTNAME):
@doas rm -f result
@nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false) @nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false)
@rm -f nixos-switch.log @rm -f nixos-switch.log
@echo Running iso build @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 # Stuff to do weekly
weekly: pull clean update world ci push clean-world weekly: pull clean update world ci push clean-world