Added more Pi specific features

This commit is contained in:
Serĉanto de Scio 2019-10-16 09:21:58 +10:00
parent 6eff66963a
commit 0dd42efca3
Signed by: sercanto
GPG key ID: A4122FF3971B6865

View file

@ -4,18 +4,33 @@
{
boot.initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
# NixOS wants to enable GRUB by default.
boot.loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true;
boot.
# For a Raspberry Pi 2 or 3):
boot.kernelPackages = pkgs.linuxPackages_latest;
# !!! Needed for the virtual console to work on the RPi 3, as the default of 16M doesn't seem to be enough.
# If X.org behaves weirdly (I only saw the cursor) then try increasing this to 256M.
boot.kernelParams = ["cma=32M"];
boot = {
initrd = {
availableKernelModules = [
"usbhid"
"usb_storage"
];
};
kernelPackages = pkgs.linuxPackages_latest; # For a Raspberry Pi 2 or 3)
kernelParams = ["cma=32M"]; # Needed for the virtual console to work on the RPi 3
loader = {
generic-extlinux-compatible = {
enable = true; # Enables the generation of /boot/extlinux/extlinux.conf
};
grub = {
enable = false; # NixOS wants to enable GRUB by default.
};
raspberryPi = {
enable = true;
version = 3;
firmwareConfig = [
"arm_64bit=1"
];
};
};
};
# File systems configuration for using the installer's partition layout
fileSystems = {
@ -28,6 +43,8 @@
# !!! Adding a swap file is optional, but strongly recommended!
swapDevices = [ { device = "/swapfile"; size = 1024; } ];
hardware.enableRedistributableFirmware = true; # Enable support for Pi firmware blobs
hardware = {
enableRedistributableFirmware = true; # Enable support for Pi firmware blobs
};
}