mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-12-01 20:55:51 +01:00
a75c20db5b
wineWowPackages.stagingFull has better compatibility than waylandFull and runs more applications without black screens. The difference between stagingFull and wine-ge is that wine-ge doesn't crash when encountering an error like ELFCLASS64 and usually opens windows larger and fullscreen-like. The reason stagingFull is preferred over wine-ge in this case is that stagingFull is a part of nixpkgs and doesn't suffer from a black screen bug when a hidden menu pushes the content in the window viewport down. Additionally, although wine-ge avoids crashes in more cases, this results in applications running that may or may not fully work, and sometimes results in black screens where there should be graphics instead.
100 lines
2.1 KiB
Nix
100 lines
2.1 KiB
Nix
{ nix-gaming, ... }:
|
|
let VARIABLES = import ../src/variables.nix; in {
|
|
containers.wine = {
|
|
privateNetwork = true;
|
|
ephemeral = true;
|
|
|
|
bindMounts = {
|
|
"/home/user" = {
|
|
hostPath = "/home/${VARIABLES.username}/containers/wine";
|
|
isReadOnly = false;
|
|
};
|
|
|
|
waylandDisplay = rec {
|
|
hostPath = "/run/user/1000";
|
|
mountPoint = hostPath;
|
|
};
|
|
|
|
x11Display = rec {
|
|
hostPath = "/tmp/.X11-unix";
|
|
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
|
|
../modules/pipewire.nix
|
|
];
|
|
programs = {
|
|
fish.enable = true;
|
|
neovim.enable = true;
|
|
starship.enable = true;
|
|
};
|
|
|
|
i18n.defaultLocale = VARIABLES.defaultLocale;
|
|
i18n.supportedLocales = VARIABLES.supportedLocales;
|
|
|
|
users = {
|
|
defaultUserShell = pkgs.fish;
|
|
mutableUsers = false;
|
|
allowNoPasswordLogin = true;
|
|
|
|
users.user = {
|
|
isNormalUser = true;
|
|
home = "/home/user";
|
|
};
|
|
};
|
|
|
|
environment = {
|
|
shells = with pkgs; [ fish ];
|
|
|
|
variables = {
|
|
TERM = "xterm-kitty";
|
|
};
|
|
|
|
defaultPackages = [ ];
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
kitty
|
|
wineWowPackages.stagingFull
|
|
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;
|
|
driSupport32Bit = true;
|
|
};
|
|
|
|
system.stateVersion = VARIABLES.stateVersion;
|
|
};
|
|
};
|
|
}
|