nix-dotfiles/modules/software/distractions/steam.nix
2024-04-26 17:00:52 -07:00

33 lines
No EOL
900 B
Nix

{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.software.distractions.steam;
in {
options.modules.software.distractions.steam = {
enable = mkEnableOption "Enable Steam, the game distribution software";
};
config = mkIf cfg.enable {
programs.steam.enable = true;
programs.gamemode = {
enable = true;
enableRenice = true;
settings = {
custom = {
start = "${pkgs.libnotify}/bin/notify-send --app-name GameMode 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send --app-name GameMode 'GameMode ended'";
};
};
};
programs.gamescope = {
enable = true;
capSysNice = true;
};
programs.steam.gamescopeSession = {
enable = true;
args = [ "-W 1920" "-H 1080" "-r 60" "--expose-wayland" "-e" ];
};
user.packages = [ pkgs.protontricks pkgs.steam-run ];
};
}