Skip to content

Instantly share code, notes, and snippets.

@ixxie

ixxie/pi.nix Secret

Created March 8, 2021 17:18
Show Gist options
  • Save ixxie/1a36773151a2014d2e9c4c701edb4f8d to your computer and use it in GitHub Desktop.
Save ixxie/1a36773151a2014d2e9c4c701edb4f8d to your computer and use it in GitHub Desktop.
{ config, pkgs, lib, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_rpi3;
initrd.includeDefaultModules = false; # due to bug in nixpkgs
loader = {
raspberryPi = {
enable = true;
version = 4;
uboot.enable = false;
firmwareConfig = ''
gpu_mem=192
dtoverlay=vc4-fkms-v3d
'';
};
grub.enable = false;
generic-extlinux-compatible.enable = false;
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/FIRMWARE";
fsType = "vfat";
};
};
hardware = {
firmware = [ pkgs.raspberrypiWirelessFirmware ];
bluetooth.enable = true;
enableRedistributableFirmware = true;
pulseaudio.enable = true;
};
sound.enable = true;
services.dbus.enable = true;
swapDevices = [ { device = "/swapfile"; size = 1024; } ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment