mirror of
https://github.com/ivabus/nixos
synced 2024-11-10 02:25:18 +03:00
36 lines
776 B
Nix
36 lines
776 B
Nix
|
|
||
|
{ config, pkgs, lib, ... }:
|
||
|
|
||
|
let
|
||
|
overlay = final: super: {
|
||
|
makeModulesClosure = x:
|
||
|
super.makeModulesClosure (x // { allowMissing = true; }); # Ignores missing kernel modules (can't build image without this fix)
|
||
|
};
|
||
|
in {
|
||
|
|
||
|
boot = {
|
||
|
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
||
|
initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
||
|
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;
|
||
|
}
|
||
|
|