mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
nixos-generate-config.pl, all-hardware.nix: Add support for Hyper-V
This commit is contained in:
parent
f9c684e152
commit
8dfa60ce73
@ -208,9 +208,6 @@ foreach my $path (glob "/sys/bus/pci/devices/*") {
|
||||
pciCheck $path;
|
||||
}
|
||||
|
||||
push @attrs, "services.xserver.videoDrivers = [ \"$videoDriver\" ];" if $videoDriver;
|
||||
|
||||
|
||||
# Idem for USB devices.
|
||||
|
||||
sub usbCheck {
|
||||
@ -277,6 +274,12 @@ if ($virt eq "qemu" || $virt eq "kvm" || $virt eq "bochs") {
|
||||
push @imports, "<nixpkgs/nixos/modules/profiles/qemu-guest.nix>";
|
||||
}
|
||||
|
||||
# Also for Hyper-V.
|
||||
if ($virt eq "microsoft") {
|
||||
push @initrdAvailableKernelModules, "hv_storvsc";
|
||||
$videoDriver = "fbdev";
|
||||
}
|
||||
|
||||
|
||||
# Pull in NixOS configuration for containers.
|
||||
if ($virt eq "systemd-nspawn") {
|
||||
@ -307,6 +310,7 @@ sub findStableDevPath {
|
||||
return $dev;
|
||||
}
|
||||
|
||||
push @attrs, "services.xserver.videoDrivers = [ \"$videoDriver\" ];" if $videoDriver;
|
||||
|
||||
# Generate the swapDevices option from the currently activated swap
|
||||
# devices.
|
||||
|
@ -42,6 +42,9 @@
|
||||
# Virtio (QEMU, KVM etc.) support.
|
||||
"virtio_net" "virtio_pci" "virtio_blk" "virtio_scsi" "virtio_balloon" "virtio_console"
|
||||
|
||||
# Hyper-V support.
|
||||
"hv_storvsc"
|
||||
|
||||
# Keyboards
|
||||
"usbhid" "hid_apple" "hid_logitech_dj" "hid_lenovo_tpkbd" "hid_roccat"
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user