nixos-configuration/modules/desktop/gaming.nix

40 lines
870 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 {
imports = [];
options.my.desktop.enableGaming = lib.mkEnableOption "gaming with wine";
config = lib.mkIf isEnabled {
2023-09-23 11:29:46 +02:00
hardware.opengl.driSupport32Bit = true;
environment.systemPackages = with pkgs; [
wineWowPackages.stagingFull
wineWowPackages.fonts
winetricks
(lutris.override {
extraPkgs = pkgs: [
# List package dependencies here
];
extraLibraries = pkgs: [
# List library dependencies here
];
})
];
2023-09-24 13:04:45 +02:00
programs = {
steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
};
2023-09-23 11:29:46 +02:00
};
}