diff options
author | lassulus <lassulus@lassul.us> | 2019-07-14 13:43:30 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2019-07-14 13:43:30 +0200 |
commit | 9b0e78fcb66b0d7accf974ab4ddf8da05612c695 (patch) | |
tree | eb41197546236a1f3c5e4efebf50c4133c8fc58f /mb/2configs/qemu-guest.nix | |
parent | 13d8d9f7d340a64cd69957854c628dc4ca0876e6 (diff) | |
parent | 976e6d77031b9e9648789d72cf893a6d1192fedb (diff) |
Merge remote-tracking branch 'mb/master'
Diffstat (limited to 'mb/2configs/qemu-guest.nix')
-rw-r--r-- | mb/2configs/qemu-guest.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mb/2configs/qemu-guest.nix b/mb/2configs/qemu-guest.nix new file mode 100644 index 000000000..315d04093 --- /dev/null +++ b/mb/2configs/qemu-guest.nix @@ -0,0 +1,19 @@ +# Common configuration for virtual machines running under QEMU (using +# virtio). + +{ ... }: + +{ + boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ]; + boot.initrd.kernelModules = [ "virtio_balloon" "virtio_console" "virtio_rng" ]; + + boot.initrd.postDeviceCommands = + '' + # Set the system time from the hardware clock to work around a + # bug in qemu-kvm > 1.5.2 (where the VM clock is initialised + # to the *boot time* of the host). + hwclock -s + ''; + + security.rngd.enable = false; +} |