mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-04-02 02:46:25 +02:00
Make wine container support display output
This *works*, and I was surprised that I needed to change little to nothing at all.
This commit is contained in:
parent
6985903631
commit
8a80c37aa8
@ -1,3 +1,7 @@
|
||||
{ config, ... }:
|
||||
|
||||
let hostCfg = config; in
|
||||
|
||||
{
|
||||
containers.wine = {
|
||||
autoStart = true;
|
||||
@ -8,6 +12,17 @@
|
||||
hostPath = "/home/user/containers/wine";
|
||||
isReadOnly = false;
|
||||
};
|
||||
|
||||
waylandDisplay = rec {
|
||||
hostPath = "/run/user/1000";
|
||||
mountPoint = hostPath;
|
||||
};
|
||||
|
||||
x11Display = rec {
|
||||
hostPath = "/tmp/.X11-unix";
|
||||
mountPoint = hostPath;
|
||||
isReadOnly = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = { pkgs, lib, ... }: {
|
||||
@ -44,6 +59,25 @@
|
||||
winetricks
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
WAYLAND_DISPLAY = "wayland-1";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
XDG_RUNTIME_DIR = "/run/user/1000";
|
||||
DISPLAY = ":0";
|
||||
};
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
extraPackages = hostCfg.hardware.opengl.extraPackages;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user