1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-23 18:19:44 +01:00
nixos-hardware/raspberry-pi/4/default.nix
2023-11-14 20:48:59 +01:00

50 lines
1.2 KiB
Nix

{ lib, pkgs, config, ... }:
{
imports = [
./audio.nix
./backlight.nix
./cpu-revision.nix
./digi-amp-plus.nix
./dwc2.nix
./i2c.nix
./leds.nix
./modesetting.nix
./pkgs-overlays.nix
./poe-hat.nix
./poe-plus-hat.nix
./pwm0.nix
./tc358743.nix
./touch-ft5406.nix
./xhci.nix
];
boot = {
kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi4;
initrd.availableKernelModules = [
"usbhid"
"usb_storage"
"vc4"
"pcie_brcmstb" # required for the pcie bus to work
"reset-raspberrypi" # required for vl805 firmware to load
];
loader = {
grub.enable = lib.mkDefault false;
generic-extlinux-compatible.enable = lib.mkDefault true;
};
};
hardware.deviceTree.filter = lib.mkDefault "bcm2711-rpi-*.dtb";
assertions = [
{
assertion = (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1");
message = "This version of raspberry pi 4 dts overlays requires a newer kernel version (>=6.1). Please upgrade nixpkgs for this system.";
}
];
# Required for the Wireless firmware
hardware.enableRedistributableFirmware = true;
}