Added more Pi specific features
This commit is contained in:
parent
6eff66963a
commit
0dd42efca3
|
@ -4,18 +4,33 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
|
boot.
|
||||||
# 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;
|
|
||||||
|
|
||||||
# For a Raspberry Pi 2 or 3):
|
boot = {
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
initrd = {
|
||||||
|
availableKernelModules = [
|
||||||
# !!! Needed for the virtual console to work on the RPi 3, as the default of 16M doesn't seem to be enough.
|
"usbhid"
|
||||||
# If X.org behaves weirdly (I only saw the cursor) then try increasing this to 256M.
|
"usb_storage"
|
||||||
boot.kernelParams = ["cma=32M"];
|
];
|
||||||
|
};
|
||||||
|
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
|
# File systems configuration for using the installer's partition layout
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
|
@ -28,6 +43,8 @@
|
||||||
# !!! Adding a swap file is optional, but strongly recommended!
|
# !!! Adding a swap file is optional, but strongly recommended!
|
||||||
swapDevices = [ { device = "/swapfile"; size = 1024; } ];
|
swapDevices = [ { device = "/swapfile"; size = 1024; } ];
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true; # Enable support for Pi firmware blobs
|
hardware = {
|
||||||
|
enableRedistributableFirmware = true; # Enable support for Pi firmware blobs
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue