Update gaming package set config

- remove unneeded code
- slight refactor
- configure PrismLauncher with Wayland GLFW support
This commit is contained in:
NullBite 2024-07-20 16:02:54 -04:00
parent d994809daa
commit 9128ecb6c4
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
2 changed files with 27 additions and 23 deletions

View File

@ -5,6 +5,12 @@ let
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
nixpkgs.overlays = let
prismlauncher-config = (final: prev: {
prismlauncher = prev.prismlauncher.override { withWaylandGLFW = true; };
});
in lib.mkAfter [ prismlauncher-config ];
nixfiles.common.wm.autostart = [ nixfiles.common.wm.autostart = [
"steam -silent" "steam -silent"
]; ];

View File

@ -1,7 +1,6 @@
{ config, lib, pkgs, inputs, ...}: { config, lib, pkgs, inputs, ...}:
let let
cfg = config.nixfiles.packageSets.gaming; cfg = config.nixfiles.packageSets.gaming;
is2311 = lib.strings.hasInfix "23.11" lib.version;
in in
{ {
# oopsies this is for home-manager # oopsies this is for home-manager
@ -12,28 +11,27 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# only needed on 23.11, increases closure size MASSIVELY nixpkgs.overlays = let
nixpkgs.overlays = lib.optional is2311 (_: _: { steamGamescopeFix = (final: prev: {
# unstable steam has new buildFSHEnv which doesn't break on rebuild steam = prev.steam.override {
steam = (import inputs.nixpkgs-unstable.outPath {config.allowUnfree = true; inherit (pkgs) system; }).steam; extraPkgs = pkgs: with pkgs; [
}) xorg.libXcursor
# gamescope fix xorg.libXi
++ [(final: prev: { xorg.libXinerama
steam = prev.steam.override { xorg.libXScrnSaver
extraPkgs = pkgs: with pkgs; [ libpng
xorg.libXcursor libpulseaudio
xorg.libXi libvorbis
xorg.libXinerama stdenv.cc.cc.lib
xorg.libXScrnSaver libkrb5
libpng keyutils
libpulseaudio ];
libvorbis };
stdenv.cc.cc.lib });
libkrb5 prismlauncherWayland = (final: prev: {
keyutils prismlauncher = prev.prismlauncher.override { withWaylandGLFW = true; };
]; });
}; in [ steamGamescopeFix prismlauncherWayland ];
})];
programs.steam = { programs.steam = {
enable = lib.mkDefault true; enable = lib.mkDefault true;