summaryrefslogtreecommitdiffstats
path: root/nixos/modules/profiles
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2022-04-30 19:17:57 +0200
committerJanne Heß <janne@hess.ooo>2022-04-30 20:47:42 +0200
commit007108f04dbb8373560556c753d5a4edd5afd16b (patch)
tree241a915ad394da0ecb7f8d70d691a79578678a07 /nixos/modules/profiles
parent5b47056b7d4ac1dcde998f9bac309a1875c670d5 (diff)
nixos/*qemu*: Add systemd initrd support
Diffstat (limited to 'nixos/modules/profiles')
-rw-r--r--nixos/modules/profiles/qemu-guest.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/profiles/qemu-guest.nix b/nixos/modules/profiles/qemu-guest.nix
index d4335edfcf2d..8b3df97ae0db 100644
--- a/nixos/modules/profiles/qemu-guest.nix
+++ b/nixos/modules/profiles/qemu-guest.nix
@@ -1,13 +1,13 @@
# Common configuration for virtual machines running under QEMU (using
# virtio).
-{ ... }:
+{ config, lib, ... }:
{
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 =
+ boot.initrd.postDeviceCommands = lib.mkIf (!config.boot.initrd.systemd.enable)
''
# 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