2023-09-01 07:13:07 +03:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
overlay = final: super: {
|
|
|
|
makeModulesClosure = x:
|
2023-09-06 16:10:11 +03:00
|
|
|
super.makeModulesClosure (x // {
|
|
|
|
allowMissing = true;
|
|
|
|
}); # Ignores missing kernel modules (can't build image without this fix)
|
2023-09-01 07:13:07 +03:00
|
|
|
};
|
|
|
|
in {
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
|
|
|
initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
2023-11-30 16:16:33 +03:00
|
|
|
supportedFilesystems = lib.mkForce [ "ext4" "vfat" ];
|
2023-09-01 07:13:07 +03:00
|
|
|
loader = {
|
|
|
|
grub.enable = false;
|
|
|
|
generic-extlinux-compatible.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-label/NIXOS_SD";
|
|
|
|
fsType = "ext4";
|
|
|
|
options = [ "noatime" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
sdImage.compressImage = false;
|
|
|
|
|
|
|
|
# Augghhh (activates fix)
|
|
|
|
nixpkgs.overlays = [ overlay ];
|
|
|
|
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
}
|
|
|
|
|