1# This module enables all hardware supported by NixOS: i.e., all
2# firmware is included, and all devices from which one may boot are
3# enabled in the initrd. Its primary use is in the NixOS installation
4# CDs.
5
6{ pkgs, lib,... }:
7let
8 platform = pkgs.stdenv.hostPlatform;
9in
10{
11
12 # The initrd has to contain any module that might be necessary for
13 # supporting the most important parts of HW like drives.
14 boot.initrd.availableKernelModules =
15 [ # SATA/PATA support.
16 "ahci"
17
18 "ata_piix"
19
20 "sata_inic162x" "sata_nv" "sata_promise" "sata_qstor"
21 "sata_sil" "sata_sil24" "sata_sis" "sata_svw" "sata_sx4"
22 "sata_uli" "sata_via" "sata_vsc"
23
24 "pata_ali" "pata_amd" "pata_artop" "pata_atiixp" "pata_efar"
25 "pata_hpt366" "pata_hpt37x" "pata_hpt3x2n" "pata_hpt3x3"
26 "pata_it8213" "pata_it821x" "pata_jmicron" "pata_marvell"
27 "pata_mpiix" "pata_netcell" "pata_ns87410" "pata_oldpiix"
28 "pata_pcmcia" "pata_pdc2027x" "pata_qdi" "pata_rz1000"
29 "pata_serverworks" "pata_sil680" "pata_sis"
30 "pata_sl82c105" "pata_triflex" "pata_via"
31 "pata_winbond"
32
33 # SCSI support (incomplete).
34 "3w-9xxx" "3w-xxxx" "aic79xx" "aic7xxx" "arcmsr"
35
36 # USB support, especially for booting from USB CD-ROM
37 # drives.
38 "uas"
39
40 # SD cards.
41 "sdhci_pci"
42
43 # Firewire support. Not tested.
44 "ohci1394" "sbp2"
45
46 # Virtio (QEMU, KVM etc.) support.
47 "virtio_net" "virtio_pci" "virtio_blk" "virtio_scsi" "virtio_balloon" "virtio_console"
48
49 # VMware support.
50 "mptspi" "vmxnet3" "vsock"
51 ] ++ lib.optional platform.isx86 "vmw_balloon"
52 ++ lib.optionals (!platform.isAarch64 && !platform.isAarch32) [ # not sure where else they're missing
53 "vmw_vmci" "vmwgfx" "vmw_vsock_vmci_transport"
54
55 # Hyper-V support.
56 "hv_storvsc"
57 ] ++ lib.optionals (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) [
58 # Most of the following falls into two categories:
59 # - early KMS / early display
60 # - early storage (e.g. USB) support
61
62 # Allows using framebuffer configured by the initial boot firmware
63 "simplefb"
64
65 # Allwinner support
66
67 # Required for early KMS
68 "sun4i-drm"
69 "sun8i-mixer" # Audio, but required for kms
70
71 # PWM for the backlight
72 "pwm-sun4i"
73
74 # Broadcom
75
76 "vc4"
77 ] ++ lib.optionals pkgs.stdenv.isAarch64 [
78 # Most of the following falls into two categories:
79 # - early KMS / early display
80 # - early storage (e.g. USB) support
81
82 # Broadcom
83
84 "pcie-brcmstb"
85
86 # Rockchip
87 "dw-hdmi"
88 "dw-mipi-dsi"
89 "rockchipdrm"
90 "rockchip-rga"
91 "phy-rockchip-pcie"
92 "pcie-rockchip-host"
93
94 # Misc. uncategorized hardware
95
96 # Used for some platform's integrated displays
97 "panel-simple"
98 "pwm-bl"
99
100 # Power supply drivers, some platforms need them for USB
101 "axp20x-ac-power"
102 "axp20x-battery"
103 "pinctrl-axp209"
104 "mp8859"
105
106 # USB drivers
107 "xhci-pci-renesas"
108
109 # Misc "weak" dependencies
110 "analogix-dp"
111 "analogix-anx6345" # For DP or eDP (e.g. integrated display)
112 ];
113
114 # Include lots of firmware.
115 hardware.enableRedistributableFirmware = true;
116
117 imports =
118 [ ../hardware/network/zydas-zd1211.nix ];
119
120}