feat: add KVM/libvirt support for staging VM #48
Reference in New Issue
Block a user
No description provided.
Delete Branch "kvm-pr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR adds
Full CI/CD pipeline for NixOS infrastructure. Consolidates PR #39 (CI workflow) and PR #42 (KVM/libvirt) into one.
Changes
1. VM Infrastructure (
modules/nixos/services/staging-vm.nix)virtualisation.libvirtdwith QEMU/KVM, OVMF (UEFI), and swtpm/var/lib/libvirt/images/var/lib/staging-vm/for test datapr-test-vmhelper script: build, start, stop, destroy, ssh2. CI Pipeline (
.gitea/workflows/build-nixos.yml)nh os build(compile validation)3. Test Suite (
tests/run-integration.sh)4. Host Config (
hosts/lazyworkhorse/configuration.nix)services.stagingVmArchitectural Decisions
Environment Variable Switching
$DOMAIN/$SITE_URLvariables.env.production(DOMAIN=lazyworkhorse.net) and.env.staging(DOMAIN=staging.lazyworkhorse.net)Staging URLs
*.staging.lazyworkhorse.netsubdomain*.staging.traffic to staging VM's internal IP (192.168.122.x)Security
Staging NFS Volume
Webhooks & Auto-Merge Plan
Auto-Merge
masteras protected branch, require CI checks to passWebhook Integration
webhook-subscriptionsskill for handling these eventsDeploy
Next Steps (after merge)
pr-test-vmfor full VM deployment teststests/run-integration.sh.env.stagingand refactor compose files*.staging.lazyworkhorse.netDNS + Traefik routingView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.