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