Migrate to Raspberry Pi 4
This commit is contained in:
parent
7502a3f518
commit
06937cda1f
|
@ -1,18 +1,14 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
# NixOS wants to enable GRUB by default
|
# NixOS wants to enable GRUB by default
|
||||||
boot.loader.grub.enable = false;
|
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
|
# A bunch of boot parameters needed for optimal runtime on RPi 4B
|
||||||
boot.kernelParams = [ "cma=32M" "zfs.zfs_arc_max=134217728" ];
|
boot.kernelPackages = pkgs.linuxPackages_rpi4;
|
||||||
|
boot.kernelParams =
|
||||||
|
[ "zfs.zfs_arc_max=134217728" "console=TTYAMA0,115200" "console=tty1" ];
|
||||||
boot.loader.raspberryPi = {
|
boot.loader.raspberryPi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
version = 3;
|
version = 4;
|
||||||
uboot.enable = true;
|
|
||||||
firmwareConfig = ''
|
|
||||||
hdmi_force_hotplug=1
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ raspberrypi-tools git htop vim ];
|
environment.systemPackages = with pkgs; [ raspberrypi-tools git htop vim ];
|
||||||
|
@ -20,7 +16,7 @@
|
||||||
# !!! Adding a swap file is optional, but strongly recommended!
|
# !!! Adding a swap file is optional, but strongly recommended!
|
||||||
swapDevices = [{
|
swapDevices = [{
|
||||||
device = "/swapfile";
|
device = "/swapfile";
|
||||||
size = 1024;
|
size = 4096;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
# Configure basic SSH access
|
# Configure basic SSH access
|
||||||
|
@ -54,7 +50,7 @@
|
||||||
services.timesyncd.enable = true;
|
services.timesyncd.enable = true;
|
||||||
|
|
||||||
# Enable ZFS support
|
# Enable ZFS support
|
||||||
networking.hostId = "bb26c304";
|
networking.hostId = "dca632d297f1";
|
||||||
boot = {
|
boot = {
|
||||||
supportedFilesystems = [ "zfs" ];
|
supportedFilesystems = [ "zfs" ];
|
||||||
zfs.extraPools = [ "vault" ];
|
zfs.extraPools = [ "vault" ];
|
||||||
|
|
Loading…
Reference in New Issue