Refactor gaming wrappers & desktop entries
- Convert wrappers for steam, heroic, and lutris to use defaults - Update desktop entries with enhanced action options - Introduce new launcher config in gojo for The Alters with proper environment
This commit is contained in:
parent
3b6d75d41c
commit
89296ce75b
2 changed files with 69 additions and 13 deletions
|
@ -25,7 +25,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
wrappers = {
|
wrappers = {
|
||||||
steam = {
|
steam = lib.mkDefault {
|
||||||
enable = true;
|
enable = true;
|
||||||
command = "${lib.getExe osConfig.programs.steam.package} -bigpicture -tenfoot";
|
command = "${lib.getExe osConfig.programs.steam.package} -bigpicture -tenfoot";
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
heroic = {
|
heroic = lib.mkDefault {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.heroic; # No special package configured by play.nix
|
package = pkgs.heroic; # No special package configured by play.nix
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
lutris = {
|
lutris = lib.mkDefault {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = osConfig.play.lutris.package;
|
package = osConfig.play.lutris.package;
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
|
@ -58,9 +58,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Override default desktop entries to use gamescope wrappers
|
|
||||||
xdg.desktopEntries = {
|
xdg.desktopEntries = {
|
||||||
steam = {
|
|
||||||
|
## Steam and Games ##
|
||||||
|
steam = lib.mkDefault {
|
||||||
name = "Steam";
|
name = "Steam";
|
||||||
comment = "Steam Big Picture in Gamescope Session";
|
comment = "Steam Big Picture in Gamescope Session";
|
||||||
exec = "${lib.getExe config.play.wrappers.steam.wrappedPackage}";
|
exec = "${lib.getExe config.play.wrappers.steam.wrappedPackage}";
|
||||||
|
@ -80,14 +81,19 @@
|
||||||
Keywords = "gaming;";
|
Keywords = "gaming;";
|
||||||
};
|
};
|
||||||
actions = {
|
actions = {
|
||||||
bigpicture = {
|
client = {
|
||||||
name = "Steam Client (No Gamescope)";
|
name = "Steam Client (No Gamescope)";
|
||||||
exec = "${lib.getExe (config.play.steam.package or pkgs.steam)}";
|
exec = "${lib.getExe osConfig.programs.steam.package}";
|
||||||
|
};
|
||||||
|
steamdeck = {
|
||||||
|
name = "Steam Deck (Gamescope)";
|
||||||
|
exec = "${lib.getExe config.play.wrappers.steam.wrappedPackage} -steamdeck";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"com.heroicgameslauncher.hgl" = {
|
## Other Launchers ##
|
||||||
|
"com.heroicgameslauncher.hgl" = lib.mkDefault {
|
||||||
name = "Heroic Games Launcher";
|
name = "Heroic Games Launcher";
|
||||||
comment = "Heroic in Gamescope Session";
|
comment = "Heroic in Gamescope Session";
|
||||||
exec = "${lib.getExe config.play.wrappers.heroic.wrappedPackage}";
|
exec = "${lib.getExe config.play.wrappers.heroic.wrappedPackage}";
|
||||||
|
@ -103,10 +109,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"net.lutris.Lutris" = {
|
"net.lutris.Lutris" = lib.mkDefault {
|
||||||
name = "Lutris";
|
name = "Lutris";
|
||||||
comment = "Video Game Preservation Platform";
|
comment = "Video Game Preservation Platform";
|
||||||
exec = "${lib.getExe (config.play.lutris.package or pkgs.lutris)} %U";
|
exec = "${lib.getExe osConfig.play.lutris.package} %U";
|
||||||
icon = "net.lutris.Lutris";
|
icon = "net.lutris.Lutris";
|
||||||
type = "Application";
|
type = "Application";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
|
@ -126,9 +132,7 @@
|
||||||
|
|
||||||
broken-exposed = {
|
broken-exposed = {
|
||||||
name = "Lutris (Gamescope BROKEN; Exposed Wayland)";
|
name = "Lutris (Gamescope BROKEN; Exposed Wayland)";
|
||||||
exec = ''${lib.getExe config.play.gamescoperun.package} -x "--force-windows-fullscreen --expose-wayland" ${
|
exec = ''${lib.getExe config.play.gamescoperun.package} -x "--force-windows-fullscreen --expose-wayland" ${lib.getExe osConfig.play.lutris.package}'';
|
||||||
lib.getExe (config.play.lutris.package or pkgs.lutris)
|
|
||||||
}'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
52
home/hosts/gojo/config/play.nix
Normal file
52
home/hosts/gojo/config/play.nix
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
osConfig,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
|
play = {
|
||||||
|
wrappers = {
|
||||||
|
alters = {
|
||||||
|
enable = true;
|
||||||
|
command = "${lib.getExe osConfig.programs.steam.package} steam://rungameid/1601570 -windowed -tenfoot";
|
||||||
|
extraOptions = {
|
||||||
|
"steam" = true;
|
||||||
|
"disable-layers" = true;
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
__GL_SHADER_DISK_CACHE_SKIP_CLEANUP = 1;
|
||||||
|
PROTON_USE_SDL = 1;
|
||||||
|
STEAM_FORCE_DESKTOPUI_SCALING = 1;
|
||||||
|
STEAM_GAMEPADUI = 1;
|
||||||
|
WAYLANDDRV_RAWINPUT = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Override default desktop entries to use gamescoperun wrappers/launchers
|
||||||
|
home.activation.removeExistingDesktopFiles = lib.hm.dag.entryBefore [ "writeBoundary" ] ''
|
||||||
|
rm -f "${config.home.homeDirectory}/.local/share/applications/The Alters.desktop"
|
||||||
|
'';
|
||||||
|
|
||||||
|
xdg.desktopEntries = {
|
||||||
|
"The Alters" = {
|
||||||
|
name = "The Alters";
|
||||||
|
comment = "A game about life, choices, and the people we meet";
|
||||||
|
exec = "${lib.getExe config.play.wrappers.alters.wrappedPackage}";
|
||||||
|
icon = "steam_icon_1601570";
|
||||||
|
type = "Application";
|
||||||
|
terminal = false;
|
||||||
|
categories = [ "Game" ];
|
||||||
|
actions = {
|
||||||
|
regular = {
|
||||||
|
name = "The Alters (No Gamescope)";
|
||||||
|
exec = "${lib.getExe osConfig.programs.steam.package} steam://rungameid/1601570 -windowed -nochatui -nofriendsui -silent";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue