mio-ops/hardware/raspberry_pi_3_model_B.nix

32 lines
1,009 B
Nix
Raw Normal View History

2019-06-26 13:25:32 +00:00
# Configuration common to all Raspberry Pi 3 Model B devices
{ config, pkgs, lib, ... }:
{
# 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.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"];
# File systems configuration for using the installer's partition layout
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
};
# !!! Adding a swap file is optional, but strongly recommended!
swapDevices = [ { device = "/swapfile"; size = 1024; } ];
hardware.enableRedistributableFirmware = true; # Enable support for Pi firmware blobs
}