Skip to content

Instantly share code, notes, and snippets.

@jslight90
Created August 16, 2019 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jslight90/7d697a5a59013393c160e5a6d15cf813 to your computer and use it in GitHub Desktop.
Save jslight90/7d697a5a59013393c160e5a6d15cf813 to your computer and use it in GitHub Desktop.
Raspberry Pi 3B+ NixOS configuration file
{ config, pkgs, ... }:
{
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
boot.loader.raspberryPi = {
enable = true;
version = 3;
uboot.enable = true;
};
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [ "cma=32M" ];
boot.initrd.kernelModules = [ "vc4" "bcm2835_dma" "i2c_bcm2835" ];
fileSystems = {
"/boot" = {
device = "/dev/disk/by-label/NIXOS_BOOT";
fsType = "vfat";
};
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
};
swapDevices = [
{ device = "/swapfile"; size = 1024; }
];
hardware.enableRedistributableFirmware = true;
networking.wireless.enable = false;
services.openssh = {
enable = true;
permitRootLogin = "yes";
};
documentation.nixos.enable = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment