nixos-configuration/modules/desktop/gaming.nix
Vinzenz Schroeter b3f1de1a7d lp2 config
2024-02-05 22:44:35 +01:00

59 lines
1.1 KiB
Nix

{
config,
pkgs,
lib,
...
}: let
isEnabled = config.my.desktop.enableGaming;
in {
options.my.desktop.enableGaming = lib.mkEnableOption "gaming with wine";
config = lib.mkIf isEnabled {
hardware = {
opengl = {
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [mangohud];
extraPackages32 = with pkgs; [mangohud];
};
steam-hardware.enable = true;
xpadneo.enable = true;
};
environment.systemPackages = with pkgs; [
wineWowPackages.stagingFull
wineWowPackages.fonts
winetricks
dxvk
mangohud
vulkan-tools
glxinfo
lutris
];
programs = {
xwayland.enable = true;
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
};
networking.firewall.allowedUDPPortRanges = [
{
# Factorio
from = 34197;
to = 34197;
}
];
my.allowUnfreePackages = [
"steam"
"steam-original"
"steam-run"
];
};
}