Skip to content

Commit

Permalink
feat(steam): create xsession desktop with only steam client
Browse files Browse the repository at this point in the history
  • Loading branch information
Wittano committed Jul 21, 2024
1 parent b78242a commit 6c9a703
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions hosts/pc/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
steam = {
enable = true;
enableScripts = true;
enableXSession = true;
};
games.enable = true;
mihoyo.enable = true;
Expand Down
14 changes: 13 additions & 1 deletion modules/desktop/gaming/steam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,21 @@ in
options.modules.desktop.gaming.steam = {
enable = mkEnableOption "Enable steam and scripts for games installed via Steam";
enableScripts = mkEnableOption "Install custom script to fix games e.g. Age of Empier, Steam systray icon or Darksider 1";
enableXSession = mkEnableOption "Create xsession application for steam in BigPicture mode";
};

config = mkIf (cfg.enable && gamingCfg.enable) {
config = mkIf (cfg.enable && gamingCfg.enable) rec {
services.xserver = {
enable = true;
windowManager.session = [{
name = "steam";
start = ''
systemd-cat -t xmonad -- ${meta.getExe programs.steam.package} -bigpicture &
waitPID=$!
'';
}];
};

programs.steam = {
enable = true;
package = unstable.steam;
Expand Down

0 comments on commit 6c9a703

Please sign in to comment.