Init
This commit is contained in:
34
nixos/hardware.nix
Normal file
34
nixos/hardware.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ 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";
|
||||
}
|
||||
Reference in New Issue
Block a user