Move VM disks out of host config

This commit is contained in:
Fern Garden 2025-09-14 22:35:01 +08:00
parent d47f621f7b
commit 7cbf708ecf
5 changed files with 22 additions and 65 deletions

View file

@ -16,7 +16,19 @@
boot.kernelModules = ["kvm-intel"];
# Configure the bootloader.
boot.loader.grub.enable = true;
boot.loader.grub = {
enable = true;
device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
};
# Root filesystem.
fileSystems."/" = {
device = "/dev/disk/by-label/root";
fsType = "ext4";
};
# Swap partition.
swapDevices = [{device = "/dev/disk/by-label/swap";}];
# Enable QEMU guest agent
services.qemuGuest.enable = true;