2023-02-06 11:58:32 +00:00
|
|
|
{ config, lib, pkgs, modulesPath, ... }:
|
2021-09-10 07:23:02 +00:00
|
|
|
{
|
|
|
|
imports = [
|
2023-02-06 11:58:32 +00:00
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
2021-09-10 07:23:02 +00:00
|
|
|
./config.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
# kernelPackages = pkgs.linuxPackages_rpi4;
|
|
|
|
tmpOnTmpfs = true;
|
2023-02-06 11:58:32 +00:00
|
|
|
initrd.availableKernelModules = [ "usbhid" "usb_storage" "xhci_pci" ];
|
2021-09-10 07:23:02 +00:00
|
|
|
# ttyAMA0 is the serial console broken out to the GPIO
|
|
|
|
kernelParams = [
|
|
|
|
"8250.nr_uarts=1"
|
|
|
|
"console=ttyAMA0,115200"
|
|
|
|
"console=tty1"
|
|
|
|
# Some gui programs need this
|
|
|
|
"cma=128M"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-06 11:58:32 +00:00
|
|
|
# boot.loader.raspberryPi = {
|
|
|
|
# enable = true;
|
|
|
|
# version = 4;
|
|
|
|
# # uboot.enable = true;
|
|
|
|
# };
|
2021-09-10 07:23:02 +00:00
|
|
|
boot.loader.grub.enable = false;
|
2023-02-06 11:58:32 +00:00
|
|
|
boot.loader.generic-extlinux-compatible.enable = true;
|
2021-09-10 07:23:02 +00:00
|
|
|
|
|
|
|
# Required for the Wireless firmware
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
2023-02-06 11:58:32 +00:00
|
|
|
networking.interfaces.eth0.useDHCP = true;
|
|
|
|
|
2021-09-10 07:23:02 +00:00
|
|
|
# Assuming this is installed on top of the disk image.
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
2023-02-06 11:58:32 +00:00
|
|
|
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
2021-09-10 07:23:02 +00:00
|
|
|
fsType = "ext4";
|
|
|
|
options = [ "noatime" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
powerManagement.cpuFreqGovernor = "ondemand";
|
|
|
|
}
|