2023-06-16 20:20:11 +02:00
|
|
|
{ nix-gaming, ... }:
|
2023-06-12 09:07:00 +02:00
|
|
|
let VARIABLES = import ../src/variables.nix; in {
|
2023-06-03 21:29:49 +02:00
|
|
|
containers.wine = {
|
|
|
|
privateNetwork = true;
|
2023-06-16 20:21:23 +02:00
|
|
|
ephemeral = true;
|
2023-06-03 21:29:49 +02:00
|
|
|
|
|
|
|
bindMounts = {
|
|
|
|
"/home/user" = {
|
2023-06-06 16:48:10 +02:00
|
|
|
hostPath = "/home/${VARIABLES.username}/containers/wine";
|
2023-06-03 21:29:49 +02:00
|
|
|
isReadOnly = false;
|
|
|
|
};
|
2023-06-03 21:36:26 +02:00
|
|
|
|
|
|
|
waylandDisplay = rec {
|
|
|
|
hostPath = "/run/user/1000";
|
|
|
|
mountPoint = hostPath;
|
|
|
|
};
|
|
|
|
|
|
|
|
x11Display = rec {
|
|
|
|
hostPath = "/tmp/.X11-unix";
|
|
|
|
mountPoint = hostPath;
|
|
|
|
isReadOnly = true;
|
|
|
|
};
|
2023-06-16 20:22:57 +02:00
|
|
|
|
|
|
|
dri = rec {
|
|
|
|
hostPath = "/dev/dri";
|
|
|
|
mountPoint = hostPath;
|
|
|
|
};
|
2023-06-03 21:29:49 +02:00
|
|
|
};
|
|
|
|
|
2023-06-16 20:22:57 +02:00
|
|
|
allowedDevices = [
|
|
|
|
{
|
|
|
|
modifier = "rw";
|
|
|
|
node = "/dev/dri/renderD128";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-06-13 15:06:39 +02:00
|
|
|
config = { pkgs, ... }: {
|
2023-06-16 20:20:11 +02:00
|
|
|
imports = [
|
|
|
|
nix-gaming.nixosModules.pipewireLowLatency
|
|
|
|
../modules/pipewire.nix
|
|
|
|
];
|
2023-06-11 15:51:26 +02:00
|
|
|
programs = {
|
|
|
|
fish.enable = true;
|
|
|
|
neovim.enable = true;
|
|
|
|
starship.enable = true;
|
|
|
|
};
|
2023-06-03 21:29:49 +02:00
|
|
|
|
2023-06-16 20:24:47 +02:00
|
|
|
i18n.defaultLocale = VARIABLES.defaultLocale;
|
|
|
|
i18n.supportedLocales = VARIABLES.supportedLocales;
|
|
|
|
|
2023-06-11 15:51:26 +02:00
|
|
|
users = {
|
|
|
|
defaultUserShell = pkgs.fish;
|
|
|
|
mutableUsers = false;
|
|
|
|
allowNoPasswordLogin = true;
|
2023-06-03 21:29:49 +02:00
|
|
|
|
2023-06-11 15:51:26 +02:00
|
|
|
users.user = {
|
|
|
|
isNormalUser = true;
|
|
|
|
home = "/home/user";
|
2023-06-03 21:29:49 +02:00
|
|
|
};
|
2023-06-11 15:51:26 +02:00
|
|
|
};
|
2023-06-03 21:29:49 +02:00
|
|
|
|
2023-06-11 15:51:26 +02:00
|
|
|
environment = {
|
|
|
|
shells = with pkgs; [ fish ];
|
2023-06-11 15:33:54 +02:00
|
|
|
|
2023-06-11 15:51:26 +02:00
|
|
|
variables = {
|
|
|
|
TERM = "xterm-kitty";
|
2023-06-03 21:29:49 +02:00
|
|
|
};
|
|
|
|
|
2023-06-11 15:51:26 +02:00
|
|
|
defaultPackages = [ ];
|
|
|
|
};
|
2023-06-03 21:29:49 +02:00
|
|
|
|
2023-06-11 15:51:26 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
kitty
|
2023-06-21 17:27:02 +02:00
|
|
|
wineWowPackages.stagingFull
|
2023-06-11 15:51:26 +02:00
|
|
|
winetricks
|
|
|
|
];
|
2023-06-03 21:29:49 +02:00
|
|
|
|
2023-06-11 15:51:26 +02:00
|
|
|
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";
|
|
|
|
};
|
2023-06-03 21:36:26 +02:00
|
|
|
|
2023-06-11 15:51:26 +02:00
|
|
|
services.xserver.enable = true;
|
2023-06-03 21:36:26 +02:00
|
|
|
|
2023-06-11 15:51:26 +02:00
|
|
|
hardware.opengl = {
|
|
|
|
enable = true;
|
|
|
|
driSupport32Bit = true;
|
2023-06-03 21:36:26 +02:00
|
|
|
};
|
2023-06-11 15:51:26 +02:00
|
|
|
|
|
|
|
system.stateVersion = VARIABLES.stateVersion;
|
|
|
|
};
|
2023-06-03 21:29:49 +02:00
|
|
|
};
|
|
|
|
}
|