diff options
author | taku0 <mxxouy6x3m_github@tatapa.org> | 2017-02-05 11:46:27 +0900 |
---|---|---|
committer | taku0 <mxxouy6x3m_github@tatapa.org> | 2017-02-05 18:22:26 +0900 |
commit | 8dfa60ce73f6bb9128fb577a8d0df3f8b86f3ddf (patch) | |
tree | 25bf6c6fed0a7c95fd7b7d4b0f4f4f6864ccbe2a /nixos/modules/installer/tools/nixos-generate-config.pl | |
parent | f9c684e1528c6e595580f4c6cdb3d6f22ae6a2e4 (diff) | |
download | nixpkgs-8dfa60ce73f6bb9128fb577a8d0df3f8b86f3ddf.tar nixpkgs-8dfa60ce73f6bb9128fb577a8d0df3f8b86f3ddf.tar.gz nixpkgs-8dfa60ce73f6bb9128fb577a8d0df3f8b86f3ddf.tar.bz2 nixpkgs-8dfa60ce73f6bb9128fb577a8d0df3f8b86f3ddf.tar.lz nixpkgs-8dfa60ce73f6bb9128fb577a8d0df3f8b86f3ddf.tar.xz nixpkgs-8dfa60ce73f6bb9128fb577a8d0df3f8b86f3ddf.tar.zst nixpkgs-8dfa60ce73f6bb9128fb577a8d0df3f8b86f3ddf.zip |
nixos-generate-config.pl, all-hardware.nix: Add support for Hyper-V
Diffstat (limited to 'nixos/modules/installer/tools/nixos-generate-config.pl')
-rw-r--r-- | nixos/modules/installer/tools/nixos-generate-config.pl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 0a5624ff6a3..c920a2b52d8 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -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. |