Cleanup gaming configs and fix gamescope
This commit is contained in:
parent
c3d60e2e15
commit
111352d376
3 changed files with 58 additions and 60 deletions
|
@ -1,5 +1,3 @@
|
||||||
# This module just provides a customized .desktop file with gamescope args dynamically created based on the
|
|
||||||
# host's monitors configuration
|
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
@ -7,50 +5,51 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
#INFO: Gamescope is REALLY broken rn, this wont work
|
||||||
monitor = lib.head (lib.filter (m: m.primary) config.monitors);
|
# let
|
||||||
steam-session =
|
# monitor = lib.head (lib.filter (m: m.primary) config.monitors);
|
||||||
let
|
# steam-session =
|
||||||
gamescope = lib.concatStringsSep " " [
|
# let
|
||||||
(lib.getExe pkgs.gamescope)
|
# gamescope = lib.concatStringsSep " " [
|
||||||
"--rt"
|
# (lib.getExe pkgs.gamescope)
|
||||||
"--output-width ${toString monitor.width}"
|
# "--rt"
|
||||||
"--output-height ${toString monitor.height}"
|
# "--output-width ${toString monitor.width}"
|
||||||
"--framerate-limit ${toString monitor.refreshRate}"
|
# "--output-height ${toString monitor.height}"
|
||||||
"--prefer-output ${monitor.name}"
|
# "--framerate-limit ${toString monitor.refreshRate}"
|
||||||
"--adaptive-sync"
|
# "--prefer-output ${monitor.name}"
|
||||||
"--expose-wayland"
|
# "--adaptive-sync"
|
||||||
"--backend wayland"
|
# "--expose-wayland"
|
||||||
"--force-grab-cursor"
|
# "--backend wayland"
|
||||||
"--steam"
|
# "--force-grab-cursor"
|
||||||
# "--hdr-enabled"
|
# "--steam"
|
||||||
];
|
# # "--hdr-enabled"
|
||||||
steam = lib.concatStringsSep " " [
|
# ];
|
||||||
"steam"
|
# steam = lib.concatStringsSep " " [
|
||||||
#"steam://open/bigpicture"
|
# "steam"
|
||||||
"-forcedesktopscaling ${toString monitor.scale}"
|
# #"steam://open/bigpicture"
|
||||||
"-nofriendsui"
|
# "-forcedesktopscaling ${toString monitor.scale}"
|
||||||
"-noschatui"
|
# "-nofriendsui"
|
||||||
];
|
# "-noschatui"
|
||||||
in
|
# ];
|
||||||
pkgs.writeTextDir "share/applications/steam-session.desktop" ''
|
# in
|
||||||
[Desktop Entry]
|
# pkgs.writeTextDir "share/applications/steam-session.desktop" ''
|
||||||
Name=Steam Session
|
# [Desktop Entry]
|
||||||
Comment=Steam with Gamescope
|
# Name=Steam Session
|
||||||
Exec=${gamescope} -- ${steam}
|
# Comment=Steam with Gamescope
|
||||||
Icon=steam
|
# Exec=${gamescope} -- ${steam}
|
||||||
Type=Application
|
# Icon=steam
|
||||||
Categories=Network;FileTransfer;Game;
|
# Type=Application
|
||||||
MimeType=x-scheme-handler/steam;x-scheme-handler/steamlink;
|
# Categories=Network;FileTransfer;Game;
|
||||||
PrefersNonDefaultGPU = true;
|
# MimeType=x-scheme-handler/steam;x-scheme-handler/steamlink;
|
||||||
'';
|
# PrefersNonDefaultGPU = true;
|
||||||
in
|
# '';
|
||||||
|
# in
|
||||||
{
|
{
|
||||||
imports = lib.custom.scanPaths ./.;
|
imports = lib.custom.scanPaths ./.;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
prismlauncher
|
prismlauncher
|
||||||
steam-session
|
# steam-session
|
||||||
# modrinth-app
|
# modrinth-app
|
||||||
(lutris.override {
|
(lutris.override {
|
||||||
extraLibraries = pkgs: [
|
extraLibraries = pkgs: [
|
||||||
|
@ -62,3 +61,6 @@ in
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# INFO: Example working command for running gamescope
|
||||||
|
# gamescope --adaptive-sync --backend sdl --expose-wayland --force-grab-cursor --framerate-limit 120 --immediate-flips --output-height 2160 --output-width 3840 --prefer-output DP-3 --rt -- gamemoderun %command%
|
||||||
|
|
|
@ -8,13 +8,6 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
# citron-emu = pkgs.callPackage (lib.custom.relativeToRoot "pkgs/common/citron-emu/package.nix") {
|
|
||||||
# inherit pkgs;
|
|
||||||
# };
|
|
||||||
# borgtui = pkgs.callPackage (lib.custom.relativeToRoot "pkgs/common/borgtui/package.nix") {
|
|
||||||
# inherit pkgs;
|
|
||||||
# };
|
|
||||||
|
|
||||||
homeDir = hostSpec.home;
|
homeDir = hostSpec.home;
|
||||||
|
|
||||||
borg-wrapper = pkgs.writeScript "borg-wrapper" ''
|
borg-wrapper = pkgs.writeScript "borg-wrapper" ''
|
||||||
|
|
|
@ -7,6 +7,13 @@
|
||||||
{
|
{
|
||||||
hardware.xone.enable = true; # xbox controller
|
hardware.xone.enable = true; # xbox controller
|
||||||
|
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
steam = {
|
steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -31,30 +38,24 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
|
gamemode
|
||||||
|
gamescope # !!!: DO NOT ADD GAMESCOPE ANYWHERE ELSE IN CONFIG, IT WILL BREAK!
|
||||||
|
gperftools
|
||||||
|
keyutils
|
||||||
|
libkrb5
|
||||||
libpng
|
libpng
|
||||||
libpulseaudio
|
libpulseaudio
|
||||||
libvorbis
|
libvorbis
|
||||||
libkrb5
|
|
||||||
keyutils
|
|
||||||
gperftools
|
|
||||||
gamemode
|
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
extraCompatPackages = [ pkgs.unstable.proton-ge-bin ];
|
extraCompatPackages = [ pkgs.unstable.proton-ge-bin ];
|
||||||
gamescopeSession.enable = true;
|
gamescopeSession.enable = true;
|
||||||
};
|
};
|
||||||
#gamescope launch args set dynamically in home/<user>/common/optional/gaming
|
|
||||||
gamescope = {
|
|
||||||
enable = true;
|
|
||||||
capSysNice = true;
|
|
||||||
};
|
|
||||||
# to run steam games in game mode, add the following to the game's properties from within steam
|
|
||||||
# gamemoderun %command%
|
|
||||||
gamemode = {
|
gamemode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
#see gamemode man page for settings info
|
|
||||||
general = {
|
general = {
|
||||||
softrealtime = "auto";
|
softrealtime = "auto";
|
||||||
inhibit_screensaver = 1;
|
inhibit_screensaver = 1;
|
||||||
|
@ -73,3 +74,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# gamescope --adaptive-sync --backend sdl --expose-wayland --force-grab-cursor --framerate-limit 120 --immediate-flips --output-height 2160 --output-width 3840 --prefer-output DP-1 --rt -- gamemoderun %command%
|
||||||
|
|
Loading…
Add table
Reference in a new issue