summaryrefslogtreecommitdiff
path: root/system-profiles/qemu-guest.nix
diff options
context:
space:
mode:
Diffstat (limited to 'system-profiles/qemu-guest.nix')
-rw-r--r--system-profiles/qemu-guest.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/system-profiles/qemu-guest.nix b/system-profiles/qemu-guest.nix
new file mode 100644
index 00000000..a231be74
--- /dev/null
+++ b/system-profiles/qemu-guest.nix
@@ -0,0 +1,19 @@
1{ ... }:
2{
3 config = {
4 boot.initrd = {
5 availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];
6 kernelModules = [ "virtio_balloon" "virtio_console" "virtio_rng" ];
7
8 postDeviceCommands =
9 ''
10 # Set the system time from the hardware clock to work around a
11 # bug in qemu-kvm > 1.5.2 (where the VM clock is initialised
12 # to the *boot time* of the host).
13 hwclock -s
14 '';
15 };
16
17 services.qemuGuest.enable = true;
18 };
19}