1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-05 01:09:44 +01:00
nixos-hardware/raspberry-pi/4/default.nix

52 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, pkgs, config, ... }:
2021-05-11 09:32:03 +02:00
{
2021-05-13 02:51:38 +02:00
imports = [
2021-08-14 17:17:21 +02:00
./audio.nix
2023-03-26 00:38:01 +01:00
./backlight.nix
2024-06-10 15:40:56 +02:00
./bluetooth.nix
./cpu-revision.nix
2023-11-14 20:47:59 +01:00
./digi-amp-plus.nix
2021-05-27 06:42:19 +02:00
./dwc2.nix
./i2c.nix
./leds.nix
2021-05-13 02:51:38 +02:00
./modesetting.nix
2023-11-14 20:47:59 +01:00
./pkgs-overlays.nix
2021-06-03 02:47:23 +02:00
./poe-hat.nix
./poe-plus-hat.nix
2023-11-14 20:47:59 +01:00
./pwm0.nix
2021-05-30 14:52:18 +02:00
./tc358743.nix
./touch-ft5406.nix
2023-09-12 16:29:55 +02:00
./xhci.nix
2021-05-13 02:51:38 +02:00
];
2021-05-11 09:32:03 +02:00
boot = {
kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi4;
initrd.availableKernelModules = [
"usbhid"
"usb_storage"
"vc4"
2023-11-14 20:47:59 +01:00
"pcie_brcmstb" # required for the pcie bus to work
"reset-raspberrypi" # required for vl805 firmware to load
];
2021-05-11 09:32:03 +02:00
loader = {
grub.enable = lib.mkDefault false;
generic-extlinux-compatible.enable = lib.mkDefault true;
2021-05-11 09:32:03 +02:00
};
};
hardware.deviceTree.filter = lib.mkDefault "bcm2711-rpi-*.dtb";
2021-05-11 09:32:03 +02:00
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.";
}
];
2021-05-11 09:32:03 +02:00
# Required for the Wireless firmware
hardware.enableRedistributableFirmware = true;
}