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