Migrate to Raspberry Pi 4

This commit is contained in:
coolneng 2020-12-22 14:49:13 +01:00
parent 7502a3f518
commit 06937cda1f
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 7 additions and 11 deletions

View File

@ -1,18 +1,14 @@
{ 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;
# A bunch of boot parameters needed for optimal runtime on RPi 3B
boot.kernelParams = [ "cma=32M" "zfs.zfs_arc_max=134217728" ];
# A bunch of boot parameters needed for optimal runtime on RPi 4B
boot.kernelPackages = pkgs.linuxPackages_rpi4;
boot.kernelParams =
[ "zfs.zfs_arc_max=134217728" "console=TTYAMA0,115200" "console=tty1" ];
boot.loader.raspberryPi = {
enable = true;
version = 3;
uboot.enable = true;
firmwareConfig = ''
hdmi_force_hotplug=1
'';
version = 4;
};
environment.systemPackages = with pkgs; [ raspberrypi-tools git htop vim ];
@ -20,7 +16,7 @@
# !!! Adding a swap file is optional, but strongly recommended!
swapDevices = [{
device = "/swapfile";
size = 1024;
size = 4096;
}];
# Configure basic SSH access
@ -54,7 +50,7 @@
services.timesyncd.enable = true;
# Enable ZFS support
networking.hostId = "bb26c304";
networking.hostId = "dca632d297f1";
boot = {
supportedFilesystems = [ "zfs" ];
zfs.extraPools = [ "vault" ];