From 9b55087bf4a02e24b667920db78ce7b78f9f2e09 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Mon, 12 Jun 2023 20:55:46 -0400 Subject: [PATCH] containers: Use graphics from host As alluded to earlier, this significantly increases the performance of graphical applications running inside containers. --- containers/srb2.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/containers/srb2.nix b/containers/srb2.nix index abd4b0b2..28cac57f 100644 --- a/containers/srb2.nix +++ b/containers/srb2.nix @@ -24,8 +24,20 @@ in mountPoint = hostPath; isReadOnly = true; }; + + dri = rec { + hostPath = "/dev/dri"; + mountPoint = hostPath; + }; }; + allowedDevices = [ + { + modifier = "rw"; + node = "/dev/dri/renderD128"; + } + ]; + config = { pkgs, lib, ... }: { imports = [ home-manager.nixosModules.home-manager