From 6376b973b15d9629653b3e1e90923c1e41a2d7a3 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Thu, 1 Aug 2024 20:38:40 +0200 Subject: [PATCH] kholinar: Add displayLink driver --- machines/kholinar/hardware.nix | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/machines/kholinar/hardware.nix b/machines/kholinar/hardware.nix index 8b69cba7..d0f6eca6 100644 --- a/machines/kholinar/hardware.nix +++ b/machines/kholinar/hardware.nix @@ -21,7 +21,10 @@ }; - chvp.base.zfs.systemLinks = [{ path = "/etc/secureboot"; type = "cache"; }]; + chvp.base = { + nix.unfreePackages = [ "displaylink" ]; + zfs.systemLinks = [{ path = "/etc/secureboot"; type = "cache"; }]; + }; # For Secure Boot management environment.systemPackages = [ pkgs.sbctl ]; @@ -73,5 +76,21 @@ ]; }; }; - services.fstrim.enable = true; + services = { + fstrim.enable = true; + xserver.videoDrivers = [ "displaylink" "modesetting" "fbdev" ]; + }; + nixpkgs.overlays = [ + (final: prev: { + wlroots = prev.wlroots.overrideAttrs (old: { + patches = (old.patches or []) ++ [( + final.fetchpatch { + url = "https://gitlab.freedesktop.org/wlroots/wlroots/uploads/b4f932e370ed03d88f202191eaf60965/DisplayLink.patch"; + hash = "sha256-1HheLsOSnj4OMiA35QCHkWprTNgAeG2tXrGbaQyUrF4="; + } + )]; + }); + }) + ]; + environment.variables.WLR_DRM_DEVICES = "/dev/dri/card0:/dev/dri/card1"; }