Files
cyper-rpi/nixos/hardware.nix
2026-02-11 11:04:59 +01:00

35 lines
717 B
Nix

{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
];
# Bootloader
boot = {
kernelPackages = pkgs.linuxPackages_rpi4;
initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
loader.generic-extlinux-compatible.enable = true;
kernelParams = [ "console=ttyS0,115200n8" ];
};
# File systems
fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
# Swap
swapDevices = [{
device = "/swapfile";
size = 4096;
}];
# RPi 4 specific hardware
hardware.enableRedistributableFirmware = true;
# SD Image
image.baseName = "nixos-rpi4";
}