Commit a3e477a60c1a

Vincent Demeester <vincent@sbr.pm>
2022-04-25 16:20:29
systems/kerkouane: import qemu-guest
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 9427336
Changed files (1)
systems
systems/hosts/kerkouane.nix
@@ -64,7 +64,7 @@ let
 in
 {
   imports = [
-    (sources.nixos + "/nixos/modules/profiles/qemu-guest.nix")
+    # (sources.nixos + "/nixos/modules/profiles/qemu-guest.nix")
     # (import ../../nix).home-manager-stable
     # ../modules/default.stable.nix
     (import ../../users).vincent
@@ -73,6 +73,18 @@ in
 
   networking.hostName = hostname;
 
+  ## From qemu-quest.nix
+  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
+    '';
+
   # START OF DigitalOcean specifics
   # FIXME: move this into a secret ?
   # This file was populated at runtime with the networking