From 07a29f8004fd346289fc6bd93fd4dbbc62148642 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 18 Feb 2024 22:04:58 +0000 Subject: [PATCH] enable opengl (maybe) --- configuration.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/configuration.nix b/configuration.nix index 91a5f75..e8df851 100644 --- a/configuration.nix +++ b/configuration.nix @@ -11,6 +11,23 @@ let }; makeFlags = ["prefix=${placeholder "out"}"]; }; + + drm-framebuffer = pkgs.stdenv.mkDerivation { + name = "drm-framebuffer"; + src = pkgs.fetchFromGitHub { + owner = "embear-engineering"; + repo = "drm-framebuffer"; + rev = "80e862bd13bc0f96848af1c1b24b4b0e1fe5b23c"; + hash = "sha256-YBRG8FUbhwAgquzehvo5Mu+xODcWOOG1HTMtUhNq6xo="; + }; + nativeBuildInputs = [ pkgs.pkg-config ]; + buildInputs = with pkgs; [ libdrm ]; + preBuild = '' + makeFlagsArray+=("CFLAGS=$($PKG_CONFIG --libs --cflags libdrm)") + ''; + makeFlags = [ "DESTDIR=${placeholder "out"}" "bindir=/bin" ]; + }; + modemFirmware = config.mobile.device.firmware.override { modem = ./local/harpia-modem; }; @@ -55,6 +72,7 @@ in { SUBSYSTEM=="rpmsg", KERNEL=="rpmsg_ctrl[0-9]*", ATTRS{rpmsg_name}=="?*", SYMLINK+="rpmsg/$attr{rpmsg_name}/ctrl" SUBSYSTEM=="rpmsg", KERNEL=="rpmsg[0-9]*", ATTR{name}=="?*", ATTRS{rpmsg_name}=="?*", SYMLINK+="rpmsg/$attr{rpmsg_name}/$attr{name}" ''; + environment.systemPackages = with pkgs; [ drm-framebuffer]; users.users.dan = { isNormalUser = true; @@ -69,5 +87,8 @@ in { device = "/dev/disk/by-partlabel/system"; fsType = "ext4"; }; + hardware.opengl = { + enable = true; driSupport = true; + }; }; }