From 4050b28ee3d79287a7331da510a350a837eb02b0 Mon Sep 17 00:00:00 2001 From: satr14 Date: Wed, 15 Apr 2026 13:14:23 +0700 Subject: [PATCH] seperate qemu settings --- modules/hardware/homelab.nix | 6 +++--- modules/hardware/misc/qemu-virtio.nix | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 modules/hardware/misc/qemu-virtio.nix diff --git a/modules/hardware/homelab.nix b/modules/hardware/homelab.nix index 906b24b..ba76f66 100644 --- a/modules/hardware/homelab.nix +++ b/modules/hardware/homelab.nix @@ -1,8 +1,8 @@ { ... }: { imports = [ - # ./misc/cpu-hotplug.nix - # ./misc/serial.nix - # ./misc/qemu-virtio.nix + ./misc/cpu-hotplug.nix + ./misc/serial.nix + ./misc/qemu-virtio.nix # ^^ only used if vm ./core/firmware.nix diff --git a/modules/hardware/misc/qemu-virtio.nix b/modules/hardware/misc/qemu-virtio.nix new file mode 100644 index 0000000..fef199b --- /dev/null +++ b/modules/hardware/misc/qemu-virtio.nix @@ -0,0 +1,14 @@ +{ ... }: { + boot.initrd.availableKernelModules = [ + "virtio_net" + "virtio_pci" + "virtio_mmio" + "virtio_blk" + "virtio_scsi" + "virtio_console" + ]; + services = { + qemuGuest.enable = true; + spice-vdagentd.enable = true; + }; +} \ No newline at end of file