From dd2c6d625ea17cacae743fa802bc6a0ff6cd6cb2 Mon Sep 17 00:00:00 2001 From: uku Date: Thu, 2 Jan 2025 17:27:00 +0100 Subject: [PATCH] feat(games): add gamescope osu! session --- programs/games.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/programs/games.nix b/programs/games.nix index 1f08d5d..1aaeb6b 100644 --- a/programs/games.nix +++ b/programs/games.nix @@ -1,4 +1,15 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: +let + osuSessionFile = + (pkgs.writeTextDir "share/wayland-sessions/osu.desktop" '' + [Desktop Entry] + Name=osu! + Comment=Free-to-win rhythm game + Exec=${lib.getExe pkgs.gamescope} -- ${lib.getExe pkgs.osu-lazer-bin} + Type=Application + '').overrideAttrs + { passthru.providedSessions = [ "osu" ]; }; +in { hardware = { xone.enable = true; @@ -26,4 +37,6 @@ gamemode.enable = true; }; + + services.displayManager.sessionPackages = [ osuSessionFile ]; }