{ config, pkgs, lib, ... }: { # NixOS wants to enable GRUB by default boot.loader.grub.enable = false; # Enables the generation of /boot/extlinux/extlinux.conf boot.loader.generic-extlinux-compatible.enable = true; # !!! Otherwise (even if you have a Raspberry Pi 2 or 3), pick this: boot.kernelPackages = pkgs.linuxPackages_latest; # A bunch of boot parameters needed for optimal runtime on RPi 3B boot.kernelParams = ["cma=32M"]; boot.loader.raspberryPi.enable = true; boot.loader.raspberryPi.version = 3; boot.loader.raspberryPi.uboot.enable = true; environment.systemPackages = with pkgs; [ raspberrypi-tools ]; # File systems configuration for using the installer's partition layout fileSystems = { "/" = { device = "/dev/disk/by-label/NIXOS_SD"; fsType = "ext4"; }; }; # !!! Adding a swap file is optional, but strongly recommended! swapDevices = [ { device = "/swapfile"; size = 1024; } ]; # Configure basic SSH access services.openssh.enable = true; services.openssh.permitRootLogin = "yes"; # Cleanup tmp on startup boot.cleanTmpDir = true; # Set hostname networking.hostName = "zion"; }