From 89361952a86ddeec814f82ca8e94d571dc7ca238 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Fri, 16 Jun 2023 14:22:57 -0400 Subject: [PATCH] containers(wine): Passthrough /dev/dri Enables the wine container to have native graphics performance on the host. --- containers/wine.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/containers/wine.nix b/containers/wine.nix index 01da159..c5f254d 100644 --- a/containers/wine.nix +++ b/containers/wine.nix @@ -20,8 +20,20 @@ let VARIABLES = import ../src/variables.nix; in { mountPoint = hostPath; isReadOnly = true; }; + + dri = rec { + hostPath = "/dev/dri"; + mountPoint = hostPath; + }; }; + allowedDevices = [ + { + modifier = "rw"; + node = "/dev/dri/renderD128"; + } + ]; + config = { pkgs, ... }: { imports = [ nix-gaming.nixosModules.pipewireLowLatency