fix(rpi4): set up GPU support

This commit is contained in:
Felix Schröter 2020-10-06 18:09:04 +02:00
parent 54d9851069
commit 486b0b0e4f
No known key found for this signature in database
GPG key ID: 910ACB9F6BD26F58
2 changed files with 20 additions and 0 deletions

19
hardware/gpu-rpi4.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
{
hardware.opengl = {
enable = true;
setLdLibraryPath = true;
package = pkgs.mesa_drivers;
};
hardware.deviceTree = {
overlays = [ "${pkgs.device-tree_rpi.overlays}/vc4-fkms-v3d.dtbo" ];
};
services.xserver = {
enable = false;
videoDrivers = [ "modesetting" ];
};
boot.loader.raspberryPi.firmwareConfig = ''
gpu_mem=192
'';
}

View file

@ -3,6 +3,7 @@
with builtins; { with builtins; {
imports = [ imports = [
# ./hardware/base.nix # ./hardware/base.nix
./hardware/gpu-rpi4.nix
# ./system # ./system
./system/nix.nix ./system/nix.nix
./system/i18n.nix ./system/i18n.nix