dotfiles/modules/nixos/gaming/steam.nix

42 lines
939 B
Nix
Raw Normal View History

2024-04-20 13:42:06 +00:00
{
config,
pkgs,
lib,
...
}:
{
2022-04-26 01:54:53 +00:00
2022-12-21 21:18:03 +00:00
options.gaming.steam.enable = lib.mkEnableOption "Steam game launcher.";
2022-04-26 01:54:53 +00:00
2022-12-21 21:18:03 +00:00
config = lib.mkIf (config.gaming.steam.enable && pkgs.stdenv.isLinux) {
2022-04-26 01:54:53 +00:00
hardware.steam-hardware.enable = true;
2024-04-20 13:42:06 +00:00
unfreePackages = [
"steam"
"steam-original"
"steamcmd"
"steam-run"
];
2022-05-28 14:34:00 +00:00
2023-03-06 04:03:34 +00:00
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
extraCompatPackages = [ pkgs.proton-ge-bin ];
2024-05-05 03:05:40 +00:00
gamescopeSession.enable = true;
2023-03-06 04:03:34 +00:00
};
environment.systemPackages = with pkgs; [
2022-05-28 14:34:00 +00:00
# Enable terminal interaction
steamPackages.steamcmd
steam-tui
2024-05-05 03:05:40 +00:00
# Overlay with performance monitoring
mangohud
2022-05-28 14:34:00 +00:00
];
2023-03-06 04:03:34 +00: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-26 01:54:53 +00:00
};
}