This project builds a NixOS virtual machine image using nixos-generate
and deploys it using Terraform with the Libvirt provider.
- Nix
- Libvirt + QEMU/KVM
- Terraform
- User in the
libvirt
group - Nix flakes support optional
Start a development shell with all tools:
nix-shell
Build the QCOW2 image:
make-boot-image
Output: image/nixos-cloudimg.qcow2/nixos.qcow2
Enter the Terraform directory:
cd terraform
terraform init
terraform apply
Destroy all created resources:
cd terraform
terraform destroy