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
13 platform = pkgs.stdenv.hostPlatform;
18 hardware.enableAllHardware = lib.mkEnableOption "Enable support for most hardware";
21 config = lib.mkIf config.hardware.enableAllHardware {
23 # The initrd has to contain any module that might be necessary for
24 # supporting the most important parts of HW like drives.
25 boot.initrd.availableKernelModules =
74 # SCSI support (incomplete).
82 # USB support, especially for booting from USB CD-ROM
92 # Firewire support. Not tested.
96 # Virtio (QEMU, KVM etc.) support.
110 ++ lib.optional platform.isx86 "vmw_balloon"
111 ++ lib.optionals (pkgs.stdenv.hostPlatform.isi686 || pkgs.stdenv.hostPlatform.isx86_64) [
114 "vmw_vsock_vmci_transport"
119 ++ lib.optionals pkgs.stdenv.hostPlatform.isAarch [
121 # Required for early KMS
123 "sun8i-mixer" # Audio, but required for kms
125 # PWM for the backlight
131 ++ lib.optionals pkgs.stdenv.hostPlatform.isAarch64 [
132 # Most of the following falls into two categories:
133 # - early KMS / early display
134 # - early storage (e.g. USB) support
148 # Misc. uncategorized hardware
150 # Used for some platform's integrated displays
154 # Power supply drivers, some platforms need them for USB
164 "reset-raspberrypi" # Triggers USB chip firmware load.
166 # Misc "weak" dependencies
168 "analogix-anx6345" # For DP or eDP (e.g. integrated display)
171 # Include lots of firmware.
172 hardware.enableRedistributableFirmware = true;