diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index bf7cdcd3711..d42c4c1f1dc 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -216,14 +216,22 @@ foreach my $path (glob "/sys/class/block/*") { } +my $dmi = `@dmidecode@/sbin/dmidecode`; + + # Check if we're a VirtualBox guest. If so, enable the guest # additions. -my $dmi = `@dmidecode@/sbin/dmidecode`; if ($dmi =~ /Manufacturer: innotek/) { push @attrs, "services.virtualbox.enable = true;" } +# Likewise for QEMU. +if ($dmi =~ /Manufacturer: Bochs/) { + push @imports, ""; +} + + # Generate the swapDevices option from the currently activated swap # devices. my @swaps = read_file("/proc/swaps"); diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 7929ef872b5..c6d30d060f2 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -39,7 +39,6 @@ let { imports = [ ./hardware-configuration.nix - ];