2023-09-23 11:29:46 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
2023-09-24 10:46:15 +02:00
|
|
|
isEnabled = config.my.desktop.enableGaming;
|
2023-09-23 11:29:46 +02:00
|
|
|
in {
|
2023-09-24 10:46:15 +02:00
|
|
|
options.my.desktop.enableGaming = lib.mkEnableOption "gaming with wine";
|
|
|
|
|
|
|
|
config = lib.mkIf isEnabled {
|
2023-09-23 11:53:52 +02:00
|
|
|
hardware.opengl = {
|
2023-10-02 17:14:20 +02:00
|
|
|
driSupport = true;
|
2023-09-23 11:53:52 +02:00
|
|
|
driSupport32Bit = true;
|
|
|
|
extraPackages = with pkgs; [mangohud];
|
|
|
|
extraPackages32 = with pkgs; [mangohud];
|
|
|
|
};
|
2023-09-23 11:29:46 +02:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
wineWowPackages.stagingFull
|
|
|
|
wineWowPackages.fonts
|
|
|
|
winetricks
|
2023-09-23 11:53:52 +02:00
|
|
|
dxvk
|
|
|
|
mangohud
|
|
|
|
vulkan-tools
|
2023-10-08 12:29:20 +02:00
|
|
|
glxinfo
|
2023-09-23 11:29:46 +02:00
|
|
|
|
|
|
|
(lutris.override {
|
|
|
|
extraPkgs = pkgs: [
|
|
|
|
# List package dependencies here
|
|
|
|
];
|
|
|
|
extraLibraries = pkgs: [
|
|
|
|
# List library dependencies here
|
|
|
|
];
|
|
|
|
})
|
|
|
|
];
|
2023-09-24 13:04:45 +02:00
|
|
|
|
2023-10-08 17:17:14 +02:00
|
|
|
hardware.steam-hardware.enable = true;
|
|
|
|
|
2023-09-24 13:04:45 +02:00
|
|
|
programs = {
|
2023-09-23 11:53:52 +02:00
|
|
|
xwayland.enable = true;
|
2023-09-24 13:04:45 +02:00
|
|
|
steam = {
|
|
|
|
enable = true;
|
2023-09-23 11:53:52 +02:00
|
|
|
remotePlay.openFirewall = true;
|
|
|
|
dedicatedServer.openFirewall = true;
|
2023-09-24 13:04:45 +02:00
|
|
|
};
|
|
|
|
};
|
2023-10-02 18:14:05 +02:00
|
|
|
|
2023-10-08 21:34:45 +02:00
|
|
|
networking.firewall.allowedUDPPortRanges = [
|
|
|
|
{
|
|
|
|
# Factorio
|
|
|
|
from = 34197;
|
|
|
|
to = 34197;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-10-02 18:14:05 +02:00
|
|
|
my.allowUnfreePackages = [
|
|
|
|
"steam"
|
|
|
|
"steam-original"
|
|
|
|
"steam-run"
|
|
|
|
];
|
2023-09-23 11:29:46 +02:00
|
|
|
};
|
|
|
|
}
|