60 lines
1.9 KiB
Nix
60 lines
1.9 KiB
Nix
# this file originates from ‘nixos-generate-config’
|
||
# but has been heavily modified
|
||
{ config, lib, pkgs, modulesPath, ... }:
|
||
|
||
{
|
||
# TODO colin: this was autogenerated. what's it do?
|
||
hardware.enableRedistributableFirmware = true;
|
||
|
||
# XXX colin: these four statements were autogenerated and placed here: why?
|
||
# boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
||
# boot.initrd.kernelModules = [ ];
|
||
# boot.kernelModules = [ ];
|
||
# boot.extraModulePackages = [ ];
|
||
|
||
# NixOS defaults to grub: we don't want that.
|
||
boot.loader.grub.enable = false;
|
||
# raspberryPi boot loader creates extlinux.conf.
|
||
# otherwise, enable the generic-extlinux-compatible loader below.
|
||
# note: THESE ARE MUTUALLY EXCLUSIVE. generic-extlinux-compatible causes uboot to not be built
|
||
# boot.loader.generic-extlinux-compatible.enable = true;
|
||
boot.loader.raspberryPiColin.enable = true;
|
||
boot.loader.raspberryPiColin.uboot.enable = true;
|
||
boot.loader.raspberryPiColin.version = 4;
|
||
|
||
boot.initrd.availableKernelModules = [
|
||
"bcm2711_thermal"
|
||
"bcm_phy_lib"
|
||
"brcmfmac"
|
||
"brcmutil"
|
||
"broadcom"
|
||
"clk_raspberrypi"
|
||
"drm" # Direct Render Manager
|
||
"enclosure" # SCSI ?
|
||
"fuse"
|
||
"mdio_bcm_unimac"
|
||
"pcie_brcmstb"
|
||
"raspberrypi_cpufreq"
|
||
"raspberrypi_hwmon"
|
||
"ses" # SCSI Enclosure Services
|
||
"uas" # USB attached storage
|
||
"uio" # userspace IO
|
||
"uio_pdrv_genirq"
|
||
"xhci_pci"
|
||
"xhci_pci_renesas"
|
||
];
|
||
boot.initrd.compressor = "gzip"; # defaults to zstd
|
||
# hack in the `boot.shell_on_fail` arg since it doesn't seem to work otherwise
|
||
boot.initrd.preFailCommands = "allowShell=1";
|
||
# default: 4 (warn). 7 is debug
|
||
# boot.consoleLogLevel = 7;
|
||
# boot.kernelParams = [
|
||
# "boot.shell_on_fail"
|
||
# # "boot.trace"
|
||
# # "systemd.log_level=debug"
|
||
# # "systemd.log_target=console"
|
||
# ];
|
||
|
||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||
}
|