diff --git a/flake.lock b/flake.lock index dcc61cf4..63504ad4 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ ] }, "locked": { - "lastModified": 1721398860, - "narHash": "sha256-J+VnzUGk0FEmpQS7yxSbaaFeWxi+oSrTAYGG/Kvyn2Q=", + "lastModified": 1721560243, + "narHash": "sha256-GFGgMqboIml64pRWKFDkvKv0YfF598IICw6l7ZuZsBg=", "owner": "ezKEa", "repo": "aagl-gtk-on-nix", - "rev": "4d3da7c00c6cf62b3fc2e1ec96e8620cbe247ba0", + "rev": "d23885fa712e639723eeda01f4d2cd26587056e6", "type": "github" }, "original": { diff --git a/hosts/pc/configuration.nix b/hosts/pc/configuration.nix index 12247585..01f5f91a 100644 --- a/hosts/pc/configuration.nix +++ b/hosts/pc/configuration.nix @@ -30,6 +30,7 @@ steam = { enable = true; enableScripts = true; + enableXSession = true; }; games.enable = true; mihoyo.enable = true; diff --git a/modules/desktop/gaming/steam.nix b/modules/desktop/gaming/steam.nix index 8a7b3f2b..10362104 100644 --- a/modules/desktop/gaming/steam.nix +++ b/modules/desktop/gaming/steam.nix @@ -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;