2023-11-23 01:21:58 -08:00
|
|
|
{ config, lib, pkgs, user, ... }:
|
2023-07-10 17:52:34 -07:00
|
|
|
|
|
|
|
let cfg = config.modules.gaming.steam;
|
|
|
|
in {
|
|
|
|
options.modules.gaming.steam.enable = lib.mkEnableOption "steam";
|
|
|
|
config = lib.mkIf cfg.enable {
|
2024-07-06 10:14:18 -07:00
|
|
|
hardware.graphics.enable = true; # this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932
|
2023-07-10 17:52:34 -07:00
|
|
|
|
|
|
|
# optionally enable 32bit pulseaudio support if pulseaudio is enabled
|
|
|
|
hardware.pulseaudio.support32Bit = config.hardware.pulseaudio.enable;
|
|
|
|
|
|
|
|
hardware.steam-hardware.enable = true;
|
2024-07-11 22:02:22 -07:00
|
|
|
# Digital distribution platform for purchasing and playing video games.
|
|
|
|
programs.steam = {
|
|
|
|
enable = true;
|
|
|
|
# Workaround from: https://github.com/NixOS/nixpkgs/issues/236561
|
|
|
|
package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; };
|
|
|
|
};
|
2023-11-23 01:21:58 -08:00
|
|
|
environment.systemPackages = with pkgs; [
|
2024-04-21 10:37:47 -07:00
|
|
|
steamtinkerlaunch # Launcher and optimization tool for Steam games.
|
|
|
|
gamescope # Utility for running games using Valve's Steam Play compatibility layer with improved performance and compatibility.
|
2023-07-10 17:52:34 -07:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|