1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-18 00:49:41 +01:00
nixos-hardware/raspberry-pi/4/default.nix
2023-11-01 15:43:04 +00:00

49 lines
1.2 KiB
Nix

{ lib, pkgs, config, ... }:
{
imports = [
./audio.nix
./backlight.nix
./cpu-revision.nix
./dwc2.nix
./i2c.nix
./modesetting.nix
./poe-hat.nix
./poe-plus-hat.nix
./tc358743.nix
./touch-ft5406.nix
./pwm0.nix
./pkgs-overlays.nix
./xhci.nix
./digi-amp-plus.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;
}