feat: add ephvm related scripts

This commit is contained in:
2026-03-07 22:10:45 +01:00
parent 53ddba4457
commit c5afcb10f7
2 changed files with 99 additions and 0 deletions

View File

@@ -33,6 +33,18 @@ build:
iso:
nixos-rebuild build-image --image-variant iso-installer --flake .#iso
# build ephemeral VM image
ephvm-build:
nixos-rebuild build-image --image-variant qemu --flake .#ephvm
# run ephemeral VM
ephvm-run *ARGS:
bash scripts/ephvm-run.sh $(find -L result -name '*.qcow2' | head -1) {{ARGS}}
# ssh into running ephemeral VM
ephvm-ssh port="2222":
ssh -p {{port}} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null matej@localhost
# garbage collect old generations
clean:
sudo nix-collect-garbage $(nix eval --raw -f ./nix.nix nix.gc.options)