forked from mirrors/nixpkgs
nixos-hardware-scan: Detect QEMU
This commit is contained in:
parent
aaf01268ff
commit
075168ca81
|
@ -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, "<nixpkgs/nixos/modules/profiles/qemu-guest.nix>";
|
||||
}
|
||||
|
||||
|
||||
# Generate the swapDevices option from the currently activated swap
|
||||
# devices.
|
||||
my @swaps = read_file("/proc/swaps");
|
||||
|
|
|
@ -39,7 +39,6 @@ let
|
|||
|
||||
{ imports =
|
||||
[ ./hardware-configuration.nix
|
||||
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
|
||||
<nixpkgs/nixos/modules/testing/test-instrumentation.nix>
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue