about summary refs log tree commit diff
path: root/nixos/modules/profiles/all-hardware.nix
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2021-01-13 14:02:30 +0100
committerVladimír Čunát <v@cunat.cz>2021-01-13 14:05:45 +0100
commit8ca33835bae0e9158f0a686dbeb139d979943064 (patch)
treefc64fef17b108e0f66aa6950d9343fc3fae038ce /nixos/modules/profiles/all-hardware.nix
parent953455920964e9bf6efaa52e97246516641ee7e9 (diff)
downloadnixlib-8ca33835bae0e9158f0a686dbeb139d979943064.tar
nixlib-8ca33835bae0e9158f0a686dbeb139d979943064.tar.gz
nixlib-8ca33835bae0e9158f0a686dbeb139d979943064.tar.bz2
nixlib-8ca33835bae0e9158f0a686dbeb139d979943064.tar.lz
nixlib-8ca33835bae0e9158f0a686dbeb139d979943064.tar.xz
nixlib-8ca33835bae0e9158f0a686dbeb139d979943064.tar.zst
nixlib-8ca33835bae0e9158f0a686dbeb139d979943064.zip
nixos: fixup build of aarch64 minimal ISO (fixes #109252)
Perhaps it's not pretty nor precise; feel free to improve.
Diffstat (limited to 'nixos/modules/profiles/all-hardware.nix')
-rw-r--r--nixos/modules/profiles/all-hardware.nix22
1 files changed, 16 insertions, 6 deletions
diff --git a/nixos/modules/profiles/all-hardware.nix b/nixos/modules/profiles/all-hardware.nix
index 19f821ae17f3..56035f7b6e46 100644
--- a/nixos/modules/profiles/all-hardware.nix
+++ b/nixos/modules/profiles/all-hardware.nix
@@ -3,20 +3,24 @@
 # enabled in the initrd.  Its primary use is in the NixOS installation
 # CDs.
 
-{ ... }:
-
+{ pkgs, lib,... }:
+let
+  platform = pkgs.stdenv.hostPlatform;
+in
 {
 
   # The initrd has to contain any module that might be necessary for
   # supporting the most important parts of HW like drives.
   boot.initrd.availableKernelModules =
-    [ # SATA/PATA support.
+      # SATA/PATA support.
+    lib.optionals (!platform.isAarch64) [ # not sure where else they're missing
       "ahci"
-
+      "sata_sil24"
+    ] ++ [
       "ata_piix"
 
       "sata_inic162x" "sata_nv" "sata_promise" "sata_qstor"
-      "sata_sil" "sata_sil24" "sata_sis" "sata_svw" "sata_sx4"
+      "sata_sil" "sata_sis" "sata_svw" "sata_sx4"
       "sata_uli" "sata_via" "sata_vsc"
 
       "pata_ali" "pata_amd" "pata_artop" "pata_atiixp" "pata_efar"
@@ -38,13 +42,19 @@
       # Firewire support.  Not tested.
       "ohci1394" "sbp2"
 
+    ] ++ lib.optionals (!platform.isAarch64) [ # not sure where else they're missing
       # Virtio (QEMU, KVM etc.) support.
       "virtio_net" "virtio_pci" "virtio_blk" "virtio_scsi" "virtio_balloon" "virtio_console"
+    ] ++ [
 
       # VMware support.
-      "mptspi" "vmw_balloon" "vmwgfx" "vmw_vmci" "vmw_vsock_vmci_transport" "vmxnet3" "vsock"
+      "mptspi" "vmxnet3" "vsock"
+    ] ++ lib.optionals (!platform.isAarch64) [ # not sure where else they're missing
+      "vmw_vmci" "vmwgfx" "vmw_vsock_vmci_transport"
+    ] ++ lib.optional platform.isx86 "vmw_balloon"
 
       # Hyper-V support.
+    ++ lib.optionals (!platform.isAarch64) [ # not sure where else they're missing
       "hv_storvsc"
     ];