2023-09-13 17:20:18 +07:00
|
|
|
{ pkgs
|
|
|
|
, config
|
|
|
|
, ... }:
|
|
|
|
|
|
|
|
{
|
2024-01-27 03:57:21 +07:00
|
|
|
boot.initrd.availableKernelModules = [
|
|
|
|
"ahci" "usbhid" "usb_storage"
|
|
|
|
"phy-rockchip-naneng-combphy"
|
2023-11-21 04:46:52 +07:00
|
|
|
];
|
2023-09-13 17:20:18 +07:00
|
|
|
|
2024-03-19 15:30:38 +07:00
|
|
|
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
|
2024-01-27 03:57:21 +07:00
|
|
|
|
2023-10-08 08:24:29 +07:00
|
|
|
boot.kernelParams = [ "dtb=/${config.hardware.deviceTree.name}" ];
|
2023-09-13 17:20:18 +07:00
|
|
|
hardware.deviceTree.enable = true;
|
|
|
|
hardware.deviceTree.name = "rockchip/rk3588s-rock-5a.dtb";
|
|
|
|
hardware.deviceTree.filter = "*-rock-5a*.dtb";
|
|
|
|
hardware.deviceTree.overlays = [ { name = "rock-5a-pcie"; filter = "*-rock-5a*.dtb"; dtsFile = ./rock-5a-pcie.dtso; } ];
|
|
|
|
|
|
|
|
# for a change, I have a big EFI partition on this device
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.systemd-boot.extraFiles.${config.hardware.deviceTree.name} = "${config.hardware.deviceTree.package}/${config.hardware.deviceTree.name}";
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
boot.initrd.compressor = "zstd";
|
2023-10-08 08:24:29 +07:00
|
|
|
nixpkgs.hostPlatform = "aarch64-linux";
|
2023-09-13 17:20:18 +07:00
|
|
|
}
|