2024-04-20 09:42:06 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
2022-04-25 21:54:53 -04:00
|
|
|
|
2022-12-21 14:18:03 -07:00
|
|
|
options.gaming.steam.enable = lib.mkEnableOption "Steam game launcher.";
|
2022-04-25 21:54:53 -04:00
|
|
|
|
2022-12-21 14:18:03 -07:00
|
|
|
config = lib.mkIf (config.gaming.steam.enable && pkgs.stdenv.isLinux) {
|
2022-04-25 21:54:53 -04:00
|
|
|
hardware.steam-hardware.enable = true;
|
2024-04-20 09:42:06 -04:00
|
|
|
unfreePackages = [
|
|
|
|
"steam"
|
|
|
|
"steam-original"
|
|
|
|
"steamcmd"
|
|
|
|
"steam-run"
|
2024-10-26 14:22:19 -04:00
|
|
|
"steam-unwrapped"
|
2024-04-20 09:42:06 -04:00
|
|
|
];
|
2022-05-28 10:34:00 -04:00
|
|
|
|
2023-03-05 23:03:34 -05:00
|
|
|
programs.steam = {
|
|
|
|
enable = true;
|
|
|
|
remotePlay.openFirewall = true;
|
2024-04-25 12:21:34 -04:00
|
|
|
extraCompatPackages = [ pkgs.proton-ge-bin ];
|
2024-05-04 23:05:40 -04:00
|
|
|
gamescopeSession.enable = true;
|
2023-03-05 23:03:34 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2022-05-28 10:34:00 -04:00
|
|
|
|
|
|
|
# Enable terminal interaction
|
2024-10-26 14:22:19 -04:00
|
|
|
steamcmd
|
2022-05-28 10:34:00 -04:00
|
|
|
steam-tui
|
|
|
|
|
2024-05-04 23:05:40 -04:00
|
|
|
# Overlay with performance monitoring
|
|
|
|
mangohud
|
2022-05-28 10:34:00 -04:00
|
|
|
];
|
2023-03-05 23:03:34 -05:00
|
|
|
|
2023-08-08 22:13:24 -04:00
|
|
|
# Seems like NetworkManager can help speed up Steam launch
|
|
|
|
# https://www.reddit.com/r/archlinux/comments/qguhco/steam_startup_time_arch_1451_seconds_fedora_34/hi8opet/
|
|
|
|
networking.networkmanager.enable = true;
|
2022-04-25 21:54:53 -04:00
|
|
|
};
|
|
|
|
}
|