summaryrefslogtreecommitdiff
path: root/system-profiles/qemu-guest.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-05-15 15:47:54 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2021-05-15 15:47:54 +0200
commit99ee3e18f337218fff3bb2970df60e78978ef523 (patch)
treea2fd3414df8a5c0013da8efd185226b1ab5b497e /system-profiles/qemu-guest.nix
parent1514c30e46768eb978996660ad46ca8e48cef5b7 (diff)
downloadnixos-99ee3e18f337218fff3bb2970df60e78978ef523.tar
nixos-99ee3e18f337218fff3bb2970df60e78978ef523.tar.gz
nixos-99ee3e18f337218fff3bb2970df60e78978ef523.tar.bz2
nixos-99ee3e18f337218fff3bb2970df60e78978ef523.tar.xz
nixos-99ee3e18f337218fff3bb2970df60e78978ef523.zip
surtr
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}