1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-23 18:19:44 +01:00
nixos-hardware/friendlyarm/nanopc-t4/default.nix
Jakub Sokołowski ff1b798346
friendlyarm/nanopc-t4: init
As suggested by @Mic92 in https://github.com/NixOS/nixpkgs/pull/111034
I'm submitting my fixes for the FriendlyARM NanoPC-T4 device.

I'm not sure if forcing a specific kernel version is kosher, but on the
other hand I don't know if my kernel config changes will work on any
other version. I'm open to suggestions as to how to do this better.

Also unusure if I should call the folder `friendlyarm` or `friendlyelec`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-05-29 09:59:44 +02:00

26 lines
797 B
Nix

{ lib, pkgs, ... }:
{
boot.loader = {
grub.enable = lib.mkDefault false;
# Enables the generation of /boot/extlinux/extlinux.conf.
generic-extlinux-compatible.enable = lib.mkDefault true;
};
# UART debug console bitrates.
services.mingetty.serialSpeed = [ 1500000 115200 ];
# Enable additional firmware (such as Wi-Fi drivers).
hardware.enableRedistributableFirmware = lib.mkDefault true;
# Fix for not detecting the M.2 NVMe SSD. Will cause recompilation.
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.10") (lib.mkDefault pkgs.linuxPackages_latest);
boot.kernelPatches = lib.mkDefault [{
name = "pcie-rockchip-config.patch";
patch = null;
extraConfig = ''
PHY_ROCKCHIP_PCIE y
PCIE_ROCKCHIP_HOST y
'';
}];
}