This commit is contained in:
chaos 2024-09-04 14:02:28 +01:00
parent da39367c55
commit 3969f33f61
No known key found for this signature in database

View file

@ -12,16 +12,12 @@
visualization-spectrum
]);
gamescope-kodi = pkgs.writeShellScriptBin "gamescope-kodi" ''
gamescope --expose-wayland --hdr-enabled -- kodi --windowing=wayland
'';
gamescopeKodiSessionFile =
kodiSessionFile =
(pkgs.writeTextDir "share/wayland-sessions/kodi.desktop" ''
[Desktop Entry]
Name=Kodi
Comment=Kodi
Exec=${gamescope-kodi}/bin/gamescope-kodi
Exec=${kodiPackage}/bin/kodi --windowing=gbm
Type=Application
'')
.overrideAttrs (_: {passthru.providedSessions = ["kodi"];});
@ -30,14 +26,7 @@ in {
kodiPackage
];
security.wrappers.gamescope = {
owner = "root";
group = "root";
source = "${pkgs.gamescope}/bin/gamescope";
capabilities = "cap_sys_nice+pie";
};
services.displayManager.sessionPackages = [gamescopeKodiSessionFile];
services.displayManager.sessionPackages = [kodiSessionFile];
services.xserver = {
enable = true;