nixos-configuration/modules/desktop/gaming.nix

47 lines
954 B
Nix
Raw Normal View History

2023-09-23 11:29:46 +02:00
{
config,
pkgs,
lib,
...
}: let
isEnabled = config.my.desktop.enableGaming;
2023-09-23 11:29:46 +02:00
in {
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-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
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-09-23 11:29:46 +02:00
};
}