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,13 +11,8 @@ 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 = (import inputs.nixpkgs-unstable.outPath {config.allowUnfree = true; inherit (pkgs) system; }).steam;
})
# gamescope fix
++ [(final: prev: {
steam = prev.steam.override { steam = prev.steam.override {
extraPkgs = pkgs: with pkgs; [ extraPkgs = pkgs: with pkgs; [
xorg.libXcursor xorg.libXcursor
@ -33,7 +27,11 @@ in
keyutils keyutils
]; ];
}; };
})]; });
prismlauncherWayland = (final: prev: {
prismlauncher = prev.prismlauncher.override { withWaylandGLFW = true; };
});
in [ steamGamescopeFix prismlauncherWayland ];
programs.steam = { programs.steam = {
enable = lib.mkDefault true; enable = lib.mkDefault true;