summary refs log tree commit diff
path: root/nixos/modules/installer/tools/nixos-generate-config.pl
diff options
context:
space:
mode:
authorVictor Nawothnig <Victor.Nawothnig@gmail.com>2020-06-22 21:40:41 +0200
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2020-11-04 10:00:28 +0100
commit27e9328895987728c499382f190a36d755eca9a2 (patch)
treefe838816343e436169f56dc600ef604e7ebeb10e /nixos/modules/installer/tools/nixos-generate-config.pl
parentc30745e0532d949ddcad902215f1b399b2f6b09d (diff)
downloadnixpkgs-27e9328895987728c499382f190a36d755eca9a2.tar
nixpkgs-27e9328895987728c499382f190a36d755eca9a2.tar.gz
nixpkgs-27e9328895987728c499382f190a36d755eca9a2.tar.bz2
nixpkgs-27e9328895987728c499382f190a36d755eca9a2.tar.lz
nixpkgs-27e9328895987728c499382f190a36d755eca9a2.tar.xz
nixpkgs-27e9328895987728c499382f190a36d755eca9a2.tar.zst
nixpkgs-27e9328895987728c499382f190a36d755eca9a2.zip
Support virtio_scsi devices on nixos-generate-config
Diffstat (limited to 'nixos/modules/installer/tools/nixos-generate-config.pl')
-rw-r--r--nixos/modules/installer/tools/nixos-generate-config.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index 44f4c44a56c..6e3ddb875e1 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -183,6 +183,11 @@ sub pciCheck {
         push @imports, "(modulesPath + \"/hardware/network/broadcom-43xx.nix\")";
     }
 
+    # In case this is a virtio scsi device, we need to explicitly make this available.
+    if ($vendor eq "0x1af4" && $device eq "0x1004") {
+        push @initrdAvailableKernelModules, "virtio_scsi";
+    }
+
     # Can't rely on $module here, since the module may not be loaded
     # due to missing firmware.  Ideally we would check modules.pcimap
     # here.