1
0
forked from extern/nix-config

containers(wine): Passthrough /dev/dri

Enables the wine container to have native graphics performance on the
host.
This commit is contained in:
Donovan Glover 2023-06-16 14:22:57 -04:00
parent 62feee858b
commit 89361952a8
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -20,8 +20,20 @@ let VARIABLES = import ../src/variables.nix; in {
mountPoint = hostPath; mountPoint = hostPath;
isReadOnly = true; isReadOnly = true;
}; };
dri = rec {
hostPath = "/dev/dri";
mountPoint = hostPath;
};
}; };
allowedDevices = [
{
modifier = "rw";
node = "/dev/dri/renderD128";
}
];
config = { pkgs, ... }: { config = { pkgs, ... }: {
imports = [ imports = [
nix-gaming.nixosModules.pipewireLowLatency nix-gaming.nixosModules.pipewireLowLatency