Enable ssh on boot and RP3 tweaks

This commit is contained in:
coolneng 2019-10-11 19:14:18 +02:00
parent 0ba48ec572
commit 5220ab4239
1 changed files with 18 additions and 8 deletions

View File

@ -8,10 +8,17 @@
# !!! Otherwise (even if you have a Raspberry Pi 2 or 3), pick this: # !!! Otherwise (even if you have a Raspberry Pi 2 or 3), pick this:
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
# !!! Needed for the virtual console to work on the RPi 3, as the default of 16M doesn't seem to be enough. # A bunch of boot parameters needed for optimal runtime on RPi 3B
# If X.org behaves weirdly (I only saw the cursor) then try increasing this to 256M. boot.kernelParams = ["cma=256M"];
# On a Raspberry Pi 4 with 4 GB, you should either disable this parameter or increase to at least 64M if you want the USB ports to work. boot.loader.raspberryPi.enable = true;
boot.kernelParams = ["cma=32M"]; boot.loader.raspberryPi.version = 3;
boot.loader.raspberryPi.uboot.enable = true;
boot.loader.raspberryPi.firmwareConfig = ''
gpu_mem=256
'';
environment.systemPackages = with pkgs; [
raspberrypi-tools
];
# File systems configuration for using the installer's partition layout # File systems configuration for using the installer's partition layout
fileSystems = { fileSystems = {
@ -27,4 +34,7 @@
# !!! Adding a swap file is optional, but strongly recommended! # !!! Adding a swap file is optional, but strongly recommended!
swapDevices = [ { device = "/swapfile"; size = 1024; } ]; swapDevices = [ { device = "/swapfile"; size = 1024; } ];
# Configure basic SSH access
services.openssh.enable = true;
} }