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
{
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 = [
"steam -silent"
];

View File

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